Example #1
0
        protected void btnedit_click(object sender, EventArgs e)
        {
            string Value = hfdselid.Value;



            Person_Details.tbl_Certification obj = Utilities_Licensing.EditCertification(Convert.ToInt32(Value));


            hfdcerti_id.Value = obj.Cert_id.ToString();

            string certificationtype = "";

            certificationtype = obj.Cert_Type;
            ddl_certification_type.SelectedValue = certificationtype;

            hfdperid.Value = obj.Person_id.ToString();

            string status = "";

            status = obj.status;
            ddl_status.SelectedValue = status;

            if (obj.Effective_dt == null)
            {
                effective_date.Text = "";
            }
            else
            {
                effective_date.Text = Convert.ToDateTime(obj.Effective_dt).ToString("MM/dd/yyyy");
            }

            if (obj.Expiry_dt == null)
            {
                exp_date.Text = "";
            }
            else
            {
                exp_date.Text = Convert.ToDateTime(obj.Expiry_dt).ToString("MM/dd/yyyy");
            }

            if (obj.Orginal_Date == null)
            {
                txt_orginaldate.Text = "";
            }
            else
            {
                txt_orginaldate.Text = Convert.ToDateTime(obj.Orginal_Date).ToString("MM/dd/yyyy");
            }


            txt_comments.Text = obj.Comments;

            string js = "Popup();";

            ScriptManager.RegisterStartupScript(Page, GetType(), "scr", js, true);
        }