public void FillGrid() { DataTable dt = objDocNo.GetDocumentNumberAll(strCompId); if (dt.Rows.Count > 0) { } else { return; } dt.Columns.Add("Module_Name"); dt.Columns.Add("Object_Name"); //dt = new DataView(dt, "Brand_Id='" + Session["BrandId"].ToString() + "' and Location_Id='" + Session["LocId"].ToString() + "' ", "", DataViewRowState.CurrentRows).ToTable(); for (int i = 0; i < dt.Rows.Count; i++) { DataTable Dtmodule = objModule.GetModuleMasterById(dt.Rows[i]["Module_Id"].ToString()); DataTable dtObject = objectEntry.GetObjectMasterById(dt.Rows[i]["Object_Id"].ToString()); try { dt.Rows[i]["Module_Name"] = Dtmodule.Rows[0]["Module_Name"].ToString(); dt.Rows[i]["Object_Name"] = dtObject.Rows[0]["Object_Name"].ToString(); } catch { } } gvDocMaster.DataSource = dt; gvDocMaster.DataBind(); AllPageCode(); Session["dtFilter"] = dt; Session["Doc"] = dt; lblTotalRecords.Text = Resources.Attendance.Total_Records + ": " + dt.Rows.Count.ToString() + ""; }
private void setHeaderImage() { string imagepath = ""; if (Session["AccordianId"] != null) { string Id = Session["AccordianId"].ToString(); if (Id == "0") { imagepath = "<img alt=Pegasus :: Project Management src=../Images/time_attendance_banner.png complete=complete width=100%/>"; LitImage.Text = imagepath; } else if (Id != "0") { DataTable dt1 = ObjModuleMaster.GetModuleMasterById(Id); imagepath = dt1.Rows[0]["Module_Banner"].ToString(); LitImage.Text = imagepath; } } }