protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "COC_SCR_003"); if (priData == null || priData.IsView != 1) { AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "COC_SCR_002.aspx"); return; } if (Request["ticketid"] != null && Request["ticketid"].ToString().Trim() != string.Empty) { txtTicketID.Text = Request["ticketid"].ToString(); if (!CheckTicketIdPrivilege(txtTicketID.Text.Trim())) { return; } ((Label)Page.Master.FindControl("lblTopic")).Text = "แสดงข้อมูล Lead: " + txtTicketID.Text.Trim() + " (View)"; StaffData staff = StaffBiz.GetStaffInfo(HttpContext.Current.User.Identity.Name); if (staff != null) { txtUserLoginChannelId.Text = staff.ChannelId; } GetLeadData(); tabExistingLead.GetExistingLeadList(txtCitizenId.Text.Trim(), txtTelNo1.Text.Trim()); tabExistingProduct.GetExistingProductList(txtCitizenId.Text.Trim()); tabOwnerLogging.GetOwnerLogingList(txtTicketID.Text.Trim()); tabPhoneCallHistory.InitialControl(lead); tabNoteHistory.InitialControl(lead); upTabMain.Update(); } else { AppUtil.ClientAlertAndRedirect(Page, "Ticket Id not found", "COC_SCR_002.aspx"); } } } catch (Exception ex) { string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message; _log.Debug(message); AppUtil.ClientAlertAndRedirect(Page, message, "COC_SCR_002.aspx"); } }