Hi, I've got a door_order table which I export to excel, now I have to make it so that underneath each door_order the products are listed from door_product table, please not that this can be more than one product for that order. This is my code so far public DataTable GetData(SqlCommand cmd) { DataTable dt = new DataTable(); SqlConnection con = new SqlConnection(@"Data Source=;Initial Catalog=bargaindoors;Persist Security Info=True;User ID=;Password="); SqlDataAdapter sda = new SqlDataAdapter(); cmd.CommandType = CommandType.Text; cmd.Connection = con; try { con.Open(); sda.SelectCommand = cmd; sda.Fill(dt); return dt; } catch (Exception ex) { throw ex; } finally { con.Close(); sda.Dispose(); …

Member Avatar
+0 forum 0

Hi I'm coding in c# and I'm usiing the IIR function of Microsoft.VisualBasic. I need values for 6 years that's 72months [code] if (i <= 72) { values[i] += C158_Calc; } B162_Calc = Financial.IRR(ref values, 0.1) * 12; row9["Month1"] = String.Format("{0:#,###,###,###.##}", B162_Calc); [/code] this gives me this error: Arguments are not valid. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Arguments are not valid. but if I say up to 10months it works, more …

Member Avatar
+0 forum 0

I want to export evrything in a page to excel, it's just the graph that does not export. I used ChartControl graph which I downloaded. [code] protected void excel_Click(object sender, EventArgs e) { excel.Visible = false; Response.ContentType = "application/ms-excel"; Response.AddHeader("content-disposition", "attachment; filename=CashFlow.xls"); } [/code]

Member Avatar
+0 forum 0

I'm creating a cash flow calculator, start and end date is entered, and then dates according to months in between are displayed. If the month is Dec or Jan t1 should change accordingly, [code] if (validation.Month == 12) t1 = t1 - 14; if (validation.Month == 01) t1 = t1 - 28; [/code] after this has happened remaining dates should be t1 = t1 - 28 Can anyone please show me how to do this?

Member Avatar
+0 forum 0

Hi everyone, I've got a DepartmenstList and CategoriesList user controls, which works with stored procedures, when the a department is selected, only then is that departments categories listed. What I need help with is, when a department is selected I want the categories to display as a submenu to the selected department. I have no idea how to accomplish this with stored procedures involved. Any help will be appreciated. DepartmentsList.ascx [code] <asp:Repeater ID="Department" runat="server" > <HeaderTemplate> <ul> </HeaderTemplate> <ItemTemplate> <li> <asp:HyperLink ID="HyperLink1" Runat="server" NavigateUrl='<%# Link.ToDepartment(Eval("DepartmentID").ToString())%>' Text='<%# HttpUtility.HtmlEncode(Eval("Name").ToString()) %>' ToolTip='<%# HttpUtility.HtmlEncode(Eval("Description").ToString()) %>' CssClass='<%# Eval("DepartmentID").ToString() == Request.QueryString["DepartmentID"] ? "DepartmentSelected" : "DepartmentUnselected" %>' …

Member Avatar
+0 forum 0

I'm working on the book "Beginning Aspnet E-Commerce with C#", but I have encountered a problem. The tutorial includes a Pager Control, this works fine for all of the products it is just when the a department is selected the pager does not work, only after a Category is selected that it works. Pager.ascx.cs [code] // simple struct that represent a (page number, url) association public struct PageURL { private string page; private string url; // page and url property definitions public string Page { get { return page; } } public string URL { get { return url; } …

Member Avatar
+0 forum 0

The End.