public ActionResult reportView() { DataTable DT = new DataTable(); DT = new DataTable(); DT = db.SqlDatatbl("SELECT * FROM VW_EMPLOYEE"); Session["ReportSource"] = DT; Session["ReportName"] = "rpt_EmployeeListing.rpt"; Response.Redirect("~/Reports/ReportView.aspx"); return(View()); }
public ActionResult Sales() { DataTable DT = new DataTable(); DT = db.SqlDatatbl("SELECT INV_NUM,INV_DATE,LOC_CODE,LOC_NAME,CUST_NAME,NETAMT FROM CREDIT_INVOICE order by inv_date desc"); List <CodeDb.Sales> Smd = new List <CodeDb.Sales>(); foreach (DataRow dr in DT.Rows) { Smd.Add(new CodeDb.Sales { INV_NUM = Convert.ToString(dr["INV_NUM"]), // adding data from dataset row in to list<modeldata> INV_DATE = Convert.ToDateTime(dr["INV_DATE"]), LOC_CODE = Convert.ToString(dr["LOC_CODE"]), LOC_NAME = Convert.ToString(dr["LOC_NAME"]), CUST_NAME = Convert.ToString(dr["CUST_NAME"]), NETAMT = Convert.ToDecimal(dr["NETAMT"]) }); } //DT = new DataTable(); //DT = db.SqlDatatbl("select bnk_code,bnk_name from bank_type"); //ViewData["bankDetails"] = DT; return(View(Smd)); }
public ActionResult CountryList() { DataTable DT = new DataTable(); DT = new DataTable(); DT = db.SqlDatatbl("SELECT CN_CD,CN_NAME FROM COUNTRY WHERE CN_CD LIKE '%' ORDER BY CN_CD"); ViewData["CountryList"] = DT; List <CodeDb.Country> Smd = new List <Models.CodeDb.Country>(); foreach (DataRow dr in DT.Rows) { Smd.Add(new CodeDb.Country { CN_CD = Convert.ToString(dr["CN_CD"]), CN_NAME = Convert.ToString(dr["CN_NAME"]) }); } return(View(Smd)); }