I currently have 3 tables and return an average value for the OverallRating Column on each to get a CombinedOverall, but what if one of the tables does not have data for a particular customer? if I divide by 3 the answer will not be the same, and I could get an answer that is over the max I want (5.0)
[Code]....
It will be possible that the Customer will not have any data in one of the tables.
my query is like this " select product_id, product_price, purchase_amout from purcases"
and on my formview i tried to add a "total purchase"
i tried using <asp:Label ID="total_purchase" runat="server" Text='<%# string.format(cint(eval("product_price")*eval("purchase_amout")),"{ Rp 0:###,###,###,###,###}")%>'>
the total amount show the correct calculation result, but the string format dont work.... so it display 20000 instead of Rp 20,000
btw. "Rp" is the currency symbol in my country... i dont use {0:c} coz the server user US currency
I have a form with a drop down list. I want to pass the value of the selected item and a hidden field called stidentid to a controller action that would check my database to see if records for that id and semester exist and return the view with the appropriate values filled in. I'm not really familliar with Javascript or Jquery so I tried this:
[Code]....
}).change();
however nothing happens when I select anything from the semester list not even a crash. What am I doing wrong?
I have a dataset with a table adapter that has several queries. I want to execute on of the queries and fill a data table but am having trouble with this operation. Am I invoking my table adapter incorrectly? See line 56.
I've been struggling for some time now with an MVC routing issue, but I have finally reached a point where the basic routing is correct; that is, the application is invoking the correct action method and .aspx page, but the action method fails because no parameters are passed to it.
Before I show detailed screenshots of the problem, I had better provide some background. This is a bibliographic application which, among other things, analyzes text abstracts to identify unique words and the number of occurrences for each word in each document. This data will eventually be inserted into a SQL Server database, but for the time being I only want to do the calculation and display the results, on a document-by-document basis, in an .ASPX view set up for the purpose. The data structure of the application is as follows:
Collections -this is a set of fifty or so CollectionDetails items.CollectionDetails represent individual documents, in this case books in an academic library. Attributes of the CollectionDetail record are those typical of a library book--author, call number, title, year, and so on. The title and subject catalog headings are combined to form a quasi-abstract, which becomes the basis of the text analysis. In a few cases, I added additional text from Google Books or Amazon synopses and reviews.
MasterStopList contains common words such as pronouns and prepositions that we want to exclude from consideration.
and I have 3 DropDownList that refer below thread [URL] ...
I use cascadingdropdown for these 3 dropdownlist below are codes:
AND
[WebMethod] public CascadingDropDownNameValue[] GetCountries(string knownCategoryValues) { string query = "SELECT state FROM stateTest"; List countries = GetData(query); return countries.ToArray(); }
[Code] ....
1-DDLstate
2-DDLcity
3-DDLregion
at first I should select Item from DDLsate then DDlcity and at the end I should select Item from DDLregion
above code work correctly for ddlstate and ddlcity but it doesn't work for ddlregion...
I mean when I select Item from ddlcity in ddlregion shows:[Metod error500]
in the client app, i want to handle SOAP exceptions thrown by web service. Currently, when exceptions are thrown by the web service, Detail.OuterXml property of SOAPException class shows below XML data. In code below, what's the correct method to reference namespace, values, etc to get to the error-code, error-field-name, error-message and error-description value?
I am doing a workshop , it has questions, and answers with radiobuttons, I need that when a click is made on a radiobutton a message appears saying that it is correct or it is not correct, how can a do it,
I am using 3 tables and are trying to get the correct info belonging to the correct id. Like this: I go to a page and here i want to see the information from the 3 tables using a specific id.
I have written this so far in a query:
[Code]....
My problem is that the last line does not work and i am uncertain how to make this work? How to write it correctly that is.
I am in the process of building a calorie calculator. I have a calculation ready to test but I am having trouble getting it to print as onto a blank label. Here is what I have so far. I just need to figure out how to print "maintainanswer" back to the user.
I have below sql statement wich don't work. It don't come up with an error but votepercentage is 0 and when I calculate it manually it should come up with
Dog = 5/9*100 = 55,55 Cat: 4/9*100 = 44,44 in votepercentage
My code:
[Code]....
The result for above code:
Dog 5 0 Cat 4 0
I triple checked that questionAnswersCount is 9 Anyone who can tell me what is wrong with this line:
(CASE WHEN pa.answersCount = 0 THEN 0 ELSE Convert(decimal, ((pa.answersCount/pq.questionAnswersCount) * 100)) END) as votepercentage
If dt1.Tables("PresentTotal").Rows(0).Item("C") Is System.DBNull.Value <> True Then ctxt.Text = dt1.Tables("PresentTotal").Rows(0).Item("C") Else ctxt.Text = "" End If
The script works fine for those peoples number is in that table but when the number of that person is not there in tahat table then it gives error...
I will enter the amount in "Amount" column and "Out Of 10 Percent", i will display the 10 Percent of the amount
Say Amount Out Of 10 Percent
1000 100
100 10.
I can do the calculation in C# and i can able to export the content to excel as above.
My need is in the exported excel, if change the amount means i should able to get the corresponding amount in the next column.
(i.e) in the exported excel, if i edit the "Amount" ->1000 to 500 means the next column "Out Of 10 Percent" should change as 100 -> 50. I mean it should be auto calculated in the exported excel.
I want to display the net amount of a calculation in two text boxes
if netamount = 45.60
first textbox should show rounded value and next textbox should show what is rounded.
I have earlier done this with c by a manual progam of rounding and now my manager dont want me do something like that because he believes c# has all math in build fucntions. So please help me friends.... I want to get the value that is rounded not numbers after the decimal i want to round a number with 10 precisions like 45.8456789990 and get a result like 46 in one textbox and 85 in another.
The asker has a number like double pi = 3.14159265d; and wants to end up with two message boxes after the fact: [ Whole Number] 3 and [2 Decimal Places] 14 and he wants to know how to best achieve this affect. He only knows that he will be given a double, but he does not know whether that number will have fractional values.
I need to do calculation of different no as shown in fig..right now i am doing addition in the normal way...adding all the values of the textboxes and thenn showig the result in the last textbox..what i want is whenever i change any value in the any textboxes it should automatically reflect the changes in the final calculation(final textbox) without using calculate button.
is there a function for adding days to a date value within a stored procedure?If I had a field with a start date and a field for duration which would be how many days the even lasts....like if I wanted something like this:TableName.StartDate, DateAdd(TableName.StartDate, TableName.Duration) as EndDate, etc
I have a claculation code in my project and it gives the result with too many decimal numbers. I wanna make it shorter as two decimal area. As in sql code, I wanna do a round fuction but I do not know how I could do it in c# ro vb? tolower function?
What changes to the function below are needed to achieve those requirements:- If you pass the same date, then 1 will be returned as the number of days- Return '5' when passing 18.10.2010 to 22.10.2010 (Mo-Fr.)- Return '0.5' when passing same date with (n) hours difference e.g. from 18.10.2010 08:00:00 and 18.10.10 12:00:00 (maybe I should ask start a new threand for this last one)
how to consume a webservice from Brazilian Correios (kind of USA Fedex).
The Web Service address is [URL]
The instructions says that I need to use the method CalcPrecoPrazo and send those parameters listed below (I already filled the variables with the correct content to help you use that webservice).
Dim nCdEmpresa As String = "" Dim sDsSenha As String = "" Dim nCdServico As String = "41106" Dim sCepOrigem As String = "87047130" Dim sCepDestino As String = "80610320" Dim nVIPeso As Decimal = 1 Dim nCDFormato As Integer = 1 Dim nVIComprimento As Decimal = 20 Dim nVIAltura As Decimal = 30 Dim nVILargura As Decimal = 30 Dim nVIDiametro As Decimal = 0 Dim sCdMaoPropria As String = "N" Dim nVIValorDeclarado As Decimal = 0 Dim sCdAvisoRecebimento As String = "N"
The result will be send by the parameter RESULTADO.SERVICOS in a array format.