protected void GetProjectProgress(string username)
        {
            objProjectCls = new ProjectClass();
            DataTable dt = objProjectCls.GetProjectProgressByID(username, Request.QueryString["cprj"], Request.QueryString["cact"]);

            if (dt.Rows.Count > 0)
            {
                txtActivity.Text    = dt.Rows[0]["t_cact"].ToString();
                txtDescription.Text = dt.Rows[0]["t_dsca"].ToString();

                txtScheduledStartDate.Text  = Convert.ToDateTime(dt.Rows[0]["t_sdst"]).ToString("dd-MM-yyyy");
                txtScheduledFinishDate.Text = Convert.ToDateTime(dt.Rows[0]["t_sdfn"]).ToString("dd-MM-yyyy");
                txtRemarks.Text             = dt.Rows[0]["t_remk"].ToString();
            }
            txtOutStartDate.Attributes.Add("type", "date");
            if ((Convert.ToDateTime(dt.Rows[0]["t_otst"]).ToString("yyyy") == "1753" || Convert.ToDateTime(dt.Rows[0]["t_otst"]).ToString("yyyy") == "1900" || (dt.Rows[0]["t_otst"]).ToString() == string.Empty))
            {
                string sdate = "yyyy-MM-dd";
                txtOutStartDate.Attributes.Add("value", sdate);
            }
            else
            {
                txtOutStartDate.Attributes.Add("value", Convert.ToDateTime(dt.Rows[0]["t_otst"]).ToString("yyyy-MM-dd"));
            }
            txtOutFinishDate.Attributes.Add("type", "date");
            if ((Convert.ToDateTime(dt.Rows[0]["t_otfn"]).ToString("yyyy") == "1753" || Convert.ToDateTime(dt.Rows[0]["t_otfn"]).ToString("yyyy") == "1900" || (dt.Rows[0]["t_otfn"]).ToString() == string.Empty))
            {
                string fdate = "yyyy-MM-dd";
                txtOutFinishDate.Attributes.Add("value", fdate);
            }
            else
            {
                txtOutFinishDate.Attributes.Add("value", Convert.ToDateTime(dt.Rows[0]["t_otfn"]).ToString("yyyy-MM-dd"));
            }

            txtActualStartDate.Attributes.Add("type", "date");
            if ((Convert.ToDateTime(dt.Rows[0]["t_acsd"]).ToString("yyyy") == "1753" || Convert.ToDateTime(dt.Rows[0]["t_acsd"]).ToString("yyyy") == "1900" || (dt.Rows[0]["t_acsd"]).ToString() == string.Empty))
            {
                string sdate = "yyyy-MM-dd";
                txtActualStartDate.Attributes.Add("value", sdate);
            }
            else
            {
                txtActualStartDate.Attributes.Add("value", Convert.ToDateTime(dt.Rows[0]["t_acsd"]).ToString("yyyy-MM-dd"));
            }
            txtActualFinishDate.Attributes.Add("type", "date");
            if ((Convert.ToDateTime(dt.Rows[0]["t_acfn"]).ToString("yyyy") == "1753" || Convert.ToDateTime(dt.Rows[0]["t_acfn"]).ToString("yyyy") == "1900" || (dt.Rows[0]["t_acfn"]).ToString() == string.Empty))
            {
                string fdate = "yyyy-MM-dd";
                txtActualFinishDate.Attributes.Add("value", fdate);
            }
            else
            {
                txtActualFinishDate.Attributes.Add("value", Convert.ToDateTime(dt.Rows[0]["t_acfn"]).ToString("yyyy-MM-dd"));
                //btnUpdate.Enabled = false;
            }
        }
Пример #2
0
        private void GetProjectProgress()
        {
            objProjectCls = new ProjectClass();
            DataTable dt = objProjectCls.GetProjectProgressByID(Request.QueryString["cprj"], Request.QueryString["cact"]);

            if (dt.Rows.Count > 0)
            {
                txtActivity.Text            = dt.Rows[0]["t_cact"].ToString();
                txtDescription.Text         = dt.Rows[0]["t_dsca"].ToString();
                txtScheduledStartDate.Text  = Convert.ToDateTime(dt.Rows[0]["t_sdst"]).ToString("dd-MM-yyyy");
                txtScheduledFinishDate.Text = Convert.ToDateTime(dt.Rows[0]["t_sdfn"]).ToString("dd-MM-yyyy");
                txtActualStartDate.Text     = Convert.ToDateTime(dt.Rows[0]["t_acsd"]).ToString("dd-MM-yyyy");
                txtActualFinishDate.Text    = Convert.ToDateTime(dt.Rows[0]["t_acfn"]).ToString("dd-MM-yyyy");
            }
        }