protected void btneditcomment_Click(object sender, EventArgs e) { string value = hfdeditid.Value; DataSet ds = Utilities_Licensing.GetSupervisorStartDate(Convert.ToInt32(value)); txtcomment.Text = ds.Tables[0].Rows[0]["Comments"].ToString(); txtPercentage.Text = ds.Tables[0].Rows[0]["Percentage"].ToString(); if (ds.Tables[0].Rows[0]["Contact_type"].ToString() == "2") { ownerdisp.Visible = true; } else { ownerdisp.Visible = false; } string js = "EditComments();"; ScriptManager.RegisterStartupScript(Page, GetType(), "scr", js, true); }
protected void btnedit_Click(object sender, EventArgs e) { string value = hfdeditid.Value; DataSet ds = Utilities_Licensing.GetSupervisorStartDate(Convert.ToInt32(value)); string startdate = ""; string enddate = ""; startdate = ds.Tables[0].Rows[0]["Start_dt"].ToString(); enddate = ds.Tables[0].Rows[0]["End_dt"].ToString(); if (startdate == "") { startdate = "01/01/0001"; } if (Convert.ToDateTime(startdate).ToString("MM/dd/yyyy") == "01/01/1900" || Convert.ToDateTime(startdate).ToString("MM/dd/yyyy") == "01/01/0001" || startdate == "" || startdate == null) { txt_startdate.Text = ""; } else { txt_startdate.Text = Convert.ToDateTime(startdate).ToString("MM/dd/yyyy"); } if (enddate == "") { enddate = "01/01/0001"; } if (Convert.ToDateTime(enddate).ToString("MM/dd/yyyy") == "01/01/1900" || Convert.ToDateTime(enddate).ToString("MM/dd/yyyy") == "01/01/0001" || enddate == "" || enddate == null) { txt_enddate.Text = ""; } else { txt_enddate.Text = Convert.ToDateTime(enddate).ToString("MM/dd/yyyy"); } string js = "Popup();"; ScriptManager.RegisterStartupScript(Page, GetType(), "scr", js, true); }