Exemple #1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                perTrackObj = new clsPerformanceTrack();
                if (txtLoan.Text != "")
                {
                    if (perTrackObj.SavePerformanceTrack(tdLoan.InnerText.Trim(), Convert.ToDateTime(txtLoan.Text), ((UserDetails)Session[clsConstant.TOKEN]).UserID))
                    {
                        lblMessage.Text      = "Information Saved Successfully";
                        lblMessage.ForeColor = System.Drawing.Color.Blue;


                        txtLoan.Text = "";
                    }
                }
                if (txtCAwd.Text != "")
                {
                    if (perTrackObj.SavePerformanceTrack(tdCAW.InnerText.Trim(), Convert.ToDateTime(txtCAwd.Text), ((UserDetails)Session[clsConstant.TOKEN]).UserID))
                    {
                        lblMessage.Text      = "Information Saved Successfully";
                        lblMessage.ForeColor = System.Drawing.Color.Blue;
                    }
                }
                if (txtCAwdMonth.Text != "")
                {
                    if (perTrackObj.SavePerformanceTrack(tdCAWM.InnerText.Trim(), Convert.ToDateTime(txtCAwdMonth.Text), ((UserDetails)Session[clsConstant.TOKEN]).UserID))
                    {
                        lblMessage.Text      = "Information Saved Successfully";
                        lblMessage.ForeColor = System.Drawing.Color.Blue;
                    }
                }
                if (txtDis.Text != "")
                {
                    if (perTrackObj.SavePerformanceTrack(tdDis.InnerText.Trim(), Convert.ToDateTime(txtDis.Text), ((UserDetails)Session[clsConstant.TOKEN]).UserID))
                    {
                        lblMessage.Text      = "Information Saved Successfully";
                        lblMessage.ForeColor = System.Drawing.Color.Blue;
                    }
                }
                if (txtDisMonth.Text != "")
                {
                    if (perTrackObj.SavePerformanceTrack(tdDisM.InnerText.Trim(), Convert.ToDateTime(txtDisMonth.Text), ((UserDetails)Session[clsConstant.TOKEN]).UserID))
                    {
                        lblMessage.Text      = "Information Saved Successfully";
                        lblMessage.ForeColor = System.Drawing.Color.Blue;
                    }
                }

                if (txtLoan.Text != "" || txtCAwd.Text != "" || txtCAwdMonth.Text != "" || txtDis.Text != "" || txtDisMonth.Text != "")
                {
                    objUtil.ResetFormControl(divpertrak);
                }
            }

            catch (Exception ex)
            {
                logger.Error(ex);
            }
        }
Exemple #2
0
        private void displayDates()
        {
            perTrackObj = new clsPerformanceTrack();
            DataSet ds = new DataSet();

            ds = perTrackObj.ShowData("");
            DataTable dt = ds.Tables[1];

            FillControls(dt);
        }