private void loadDSR(string strDate) { try { _daDSR = new DA_DSR(); _lstDSR = _daDSR.GetDSR(strDate); dvDSRData.DataSource = _lstDSR; dvDSRData.DataBind(); } catch (Exception ex) { ClientScript.RegisterStartupScript(GetType(), "DSR Report", "alert(" + Message.ErrorMessage + ");", true); EXCEPTION_UTILITY.WriteToLog(ex, GetLogFilePath(), _UserModel.LoginId, "DSR Report", "ETS", "loadDSR"); } }
private void bindGridView() { try { _daDSR = new DA_DSR(); _lstDSR = _daDSR.GetDSR(ConvertToDBDate(txtDSRDate.Text)); dvDSRData.DataSource = _lstDSR; dvDSRData.DataBind(); } catch (Exception ex) { ClientScript.RegisterStartupScript(GetType(), "DSR Report", "alert(" + Message.ErrorMessage + ");", true); EXCEPTION_UTILITY.WriteToLog(ex, GetLogFilePath(), _UserModel.LoginId, "DSR Report", "ETS", "bindGridView"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { try { _objXml = new Task(); User _objuser = new User(); _objuser = (User)Session["user"]; if (Session["dsr"] != null) { _dtDSRRecord = (DataTable)Session["dsr"]; DataSet dsData = new DataSet(); dsData.Tables.Add(_dtDSRRecord); _objXml.strXMLData = dsData.GetXml(); _objXml.CreatedByCode = _objuser.UserCode; _daXml = new DA_DSR(); blResult = _daXml.insertDSR(_objXml); if (blResult == true) { Response.Redirect("~/Account/DSR.aspx"); Page.ClientScript.RegisterStartupScript(GetType(), "DSR", "alert('DSR Submitted successfully');", true); } else { Page.ClientScript.RegisterStartupScript(GetType(), "New Rerequirement", "alert('DSR Updation is not successful');", true); } Session["dsr"] = null; } else { ClientScript.RegisterStartupScript(GetType(), "DSR", "alert(" + Message.EmptyRecords + ");", true); } } catch (Exception ex) { ClientScript.RegisterStartupScript(GetType(), "DSR", "alert(" + Message.ErrorMessage + ");", true); //EXCEPTION_UTILITY.WriteToLog(ex, GetLogFilePath(), _UserModel.LoginId, "DSR", "ETS", "loadDSR"); } }