Example #1
0
        protected void buttonedit_click(object sender, EventArgs e)
        {
            string value = hfdstateid.Value;

            Person_Details.tbl_otherstatelicense obj = Licensing_Details.Edit_otherstatelicense(Convert.ToInt32(value));
            hfdstateid.Value = obj.Osl_ID.ToString();
            Txt_licnum.Text  = obj.Licno;
            string status = "";

            status = obj.Status.ToString();
            if (ddlstatus.Items[0].Text != status)
            {
                ddlstatus.Items[0].Selected = false;
                if (ddlstatus.Items.FindByText(status) != null)
                {
                    ddlstatus.Items.FindByText(status).Selected = true;
                }
            }
            if (obj.Date_Received == Convert.ToDateTime("01/01/1900"))
            {
                Txt_datereceived.Text = "";
            }
            else
            {
                Txt_datereceived.Text = Convert.ToDateTime(obj.Date_Received).ToString("MM/dd/yyyy");
            }



            //string isparent = obj.Is_ParentLicmust;
            //if (isparent == "True")
            //    chk_parentidmust.Checked = true;
            //else
            //    chk_parentidmust.Checked = false;
            string Otherstatelicense = obj.isothers.ToString();

            if (Otherstatelicense == "True")
            {
                Chk_otherstatelic.Checked = true;
            }
            else
            {
                Chk_otherstatelic.Checked = false;
            }
            Txt_state.Text = obj.states;
            string js = "Popup2();";

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