protected void Page_Load(object sender, EventArgs e) { string complaintid = Session["csmid"].ToString(); BLLCollection<csm_CaseHistory_trans> col = new BLLCollection<csm_CaseHistory_trans>(); csm_CaseHistory_trans objhistory = new csm_CaseHistory_trans(); col = objhistory.Get_All_By_ComplaintId(complaintid); grdvwdate.DataSource = col; grdvwdate.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { string complaintid = Session["csmid"].ToString(); BLLCollection <csm_CaseHistory_trans> col = new BLLCollection <csm_CaseHistory_trans>(); csm_CaseHistory_trans objhistory = new csm_CaseHistory_trans(); col = objhistory.Get_All_By_ComplaintId(complaintid); grdvwdate.DataSource = col; grdvwdate.DataBind(); }
protected void Page_Load(object sender, EventArgs e) {//Add Exception handilng try catch change by vishal 21-05-2012 try { string complaintid = Session["csmid"].ToString(); BLLCollection <csm_CaseHistory_trans> col = new BLLCollection <csm_CaseHistory_trans>(); csm_CaseHistory_trans objhistory = new csm_CaseHistory_trans(); col = objhistory.Get_All_By_ComplaintId(complaintid); grdvwdate.DataSource = col; grdvwdate.DataBind(); } catch (Exception ex) { string myScript; myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>"; Page.RegisterClientScriptBlock("MyScript", myScript); return; } }
protected void Page_Load(object sender, EventArgs e) { //Add Exception handilng try catch change by vishal 21-05-2012 try { string complaintid = Session["csmid"].ToString(); BLLCollection<csm_CaseHistory_trans> col = new BLLCollection<csm_CaseHistory_trans>(); csm_CaseHistory_trans objhistory = new csm_CaseHistory_trans(); col = objhistory.Get_All_By_ComplaintId(complaintid); grdvwdate.DataSource = col; grdvwdate.DataBind(); } catch (Exception ex) { string myScript; myScript = "<script language=javascript>alert('Exception - '" + ex + "');</script>"; Page.RegisterClientScriptBlock("MyScript", myScript); return; } }
public object Generatecsm_CaseHistory_trans_mstObject(ref IDataReader returnData) { csm_CaseHistory_trans obj = new csm_CaseHistory_trans(); while (returnData.Read()) { obj.ComplaintId = (string)returnData["ComplaintId"]; obj.CallLogNotes = (string)returnData["CallLogNotes"]; obj.CompId = (string)returnData["CompId"]; obj.ComplaintStatus = (string)returnData["ComplaintStatus"]; obj.EngineerId = (string)returnData["EngineerId"]; obj.ItemId = (string)returnData["ItemId"]; obj.OrgId = (string)returnData["OrgId"]; obj.UserName = (string)returnData["UserName"]; if (returnData["ChangedStatusDate"] != DBNull.Value) { DateTime Mydatetime = new DateTime(); Mydatetime = (DateTime)returnData["ChangedStatusDate"]; obj.ChangedStatusDate = Mydatetime.ToString(); } if (returnData["PendingReason"] != DBNull.Value) { obj.PendingReason = (string)returnData["PendingReason"]; } if (returnData["ComplaintDate "] != DBNull.Value) { DateTime Mydatetime = new DateTime(); Mydatetime = (DateTime)returnData["ComplaintDate "]; obj.ComplaintDate = Mydatetime.ToString(); } } returnData.Close(); returnData.Dispose(); return obj; }