protected void btnExcel_Click(object sender, ImageClickEventArgs e) { System.Data.DataSet ds = new DataSet(); Business.university.Request.CheckOutRequestBusiness r = new Business.university.Request.CheckOutRequestBusiness(); bool allInOne = true; if (!allInOne) { switch (drpReportType.SelectedItem.Value) { case "st": ds.Tables.Add(r.getCheckoutFrequencyAllStudents()); ds.Tables[ds.Tables.Count - 1].TableName = "علت انصراف هر دانشجو"; break; case "rsn": ds.Tables.Add(r.getCheckoutFrequencyIteration()); ds.Tables[ds.Tables.Count - 1].TableName = "فراوانی در هر دسته بندی"; break; case "dnsh": ds.Tables.Add(r.getCheckoutFrequency_ByDepartment()); ds.Tables[ds.Tables.Count - 1].TableName = "به تفکیک دانشکده"; break; case "lvl": ds.Tables.Add(r.getCheckoutFrequency_ByLevel()); ds.Tables[ds.Tables.Count - 1].TableName = "به تفکیک مقطع"; break; case "ent": ds.Tables.Add(r.getCheckoutFrequency_ByEnterYear()); ds.Tables[ds.Tables.Count - 1].TableName = "به تفکیک ورودی"; break; } } else { ds.Tables.Add(r.getCheckoutFrequencyAllStudents()); ds.Tables[ds.Tables.Count - 1].TableName = "علت انصراف هر دانشجو"; ds.Tables.Add(r.getCheckoutFrequencyIteration()); ds.Tables[ds.Tables.Count - 1].TableName = "فراوانی در هر دسته بندی"; ds.Tables.Add(r.getCheckoutFrequency_ByDepartment()); ds.Tables[ds.Tables.Count - 1].TableName = "به تفکیک دانشکده"; ds.Tables.Add(r.getCheckoutFrequency_ByLevel()); ds.Tables[ds.Tables.Count - 1].TableName = "به تفکیک مقطع"; ds.Tables.Add(r.getCheckoutFrequency_ByEnterYear()); ds.Tables[ds.Tables.Count - 1].TableName = "به تفکیک ورودی"; } createExcel(ds, string.Format("{0} _ {1}", DateTime.Now.ToPeString().Replace("/", "-"), "گزارش علت انصراف دانشجویان")); }
private void setGridSource_byPerson() { Business.university.Request.CheckOutRequestBusiness r = new Business.university.Request.CheckOutRequestBusiness(); var dt = r.getCheckoutFrequencyAllStudents(); grdReason.DataSource = dt; grdReason.DataBind(); }