コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!IsPostBack)
         {
             ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "COC_SCR_010");
             if (priData == null || priData.IsView != 1)
             {
                 AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "COC_SCR_002.aspx");
                 return;
             }
             else
             {
                 InitialControl();
             }
         }
     }
     catch (Exception ex)
     {
         string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
         _log.Debug(message);
         AppUtil.ClientAlert(Page, message);
     }
 }
コード例 #2
0
ファイル: SLM_SCR_024.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_024");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    Page.Form.DefaultButton = btnSearch.UniqueID;
                    InitialControl();
                    DoSearchAccessRightList(0);
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "COC_SCR_008");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "COC_SCR_002.aspx");
                        return;
                    }

                    txtTeamList.Text = AppUtil.GetRecursiveTeam(HttpContext.Current.User.Identity.Name);
                    //tdAssignDateFrom.DateValue = DateTime.Now;
                    //tdAssignDateTo.DateValue = DateTime.Now;
                }
            }
            catch (Exception ex)
            {
                string message = ex.Message;
                _log.Debug(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #4
0
ファイル: SLM_SCR_034.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_034");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    ((Label)Page.Master.FindControl("lblTopic")).Text = "นำเข้างานติดปัญหา";
                    Page.Form.Attributes.Add("enctype", "multipart/form-data");

                    Page.Form.DefaultButton = btnSearch.UniqueID;

                    cmbInsComImport.DataSource = SlmScr034Biz.GetImportInsComListData();
                    cmbInsComImport.DataBind();

                    cmbInsComSearch.DataSource = SlmScr034Biz.GetSearchInsComListData();
                    cmbInsComSearch.DataBind();

                    cmbFileNameSearch.DataSource = SlmScr034Biz.GetSearchFileNameListData();
                    cmbFileNameSearch.DataBind();
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ((Label)Page.Master.FindControl("lblTopic")).Text = "แก้ไขข้อมูล Lead (Edit)";

                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_011");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    if (Request["ticketid"] != null && Request["ticketid"].ToString().Trim() != string.Empty)
                    {
                        CheckTicketIdPrivilege(Request["ticketid"].ToString().Trim());
                    }
                    else
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "Ticket Id not found", "SLM_SCR_003.aspx");
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                AppUtil.ClientAlert(Page, ex.InnerException != null ? ex.InnerException.Message : ex.Message);
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ((Label)Page.Master.FindControl("lblTopic")).Text = "Upload Lead Management";

                ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_102");
                if (priData == null || priData.IsView != 1)
                {
                    AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_102.aspx");
                    return;
                }

                gvError.Visible    = false;
                gvResult.Visible   = false;
                pcTopError.Visible = false;
                pcTop.Visible      = false;
                initControl();
            }
            else
            {
                vtxtFileName.Text     = "";
                lblAlertCampaign.Text = "";
            }
        }
コード例 #7
0
ファイル: SLM_SCR_047.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_047");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    ((Label)Page.Master.FindControl("lblTopic")).Text = "ตรวจสอบข้อมูลการจ่ายงาน";
                    Page.Form.DefaultButton        = btnSearch.UniqueID;
                    pcTop.SetVisible               = false;
                    tdmTransferDateEnd.DateValue   = DateTime.Now;
                    tdmTransferDateStart.DateValue = DateTime.Now;
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_030");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    InitialControl();

                    DoSearchConfigCustomer(0);      //Gridview Assign Config Customer
                    DoSearchConfigStaff(0);         //Gridview Assign Config Staff
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #9
0
ファイル: SLM_SCR_029.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    Session.Remove(SLMConstant.SessionName.tabscreenlist);
                    Session.Remove(SLMConstant.SessionName.configscreen);

                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_029");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    if (string.IsNullOrEmpty(Request["backtype"]))
                    {
                        Session.Remove("followupsearchcondition");
                        Session.Remove("inboundsearchcondition");
                    }
                    InitialData();
                    tabMain.ActiveTabIndex = Request["backtype"] == "3" ? 1 : 0;
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "COC_SCR_006");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "COC_SCR_002.aspx");
                        return;
                    }

                    InitialControl();
                    SetDept();
                    if (Session[coc_staffsearchcondition] != null)
                    {
                        SetSerachCondition((StaffDataManagement)Session[coc_staffsearchcondition]);  //Page Load กลับมาจากหน้าอื่น
                        Session[coc_staffsearchcondition] = null;
                    }
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Debug(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #11
0
ファイル: SLM_SCR_042.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_042");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    ((Label)Page.Master.FindControl("lblTopic")).Text = "ข้อมูลบริษัทประกันภัย";

                    Page.Form.DefaultButton = btnSearch.UniqueID;
                    InitialControl();
                    // DoSearchBranch(0);
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_018");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    if (Session[ss_staffid] != null)
                    {
                        txtStaffId.Text = Session[ss_staffid].ToString();
                        InitialControl();
                        LoadStaffData();
                        //GetCampaignData();
                        tabOwner.Username = txtUsername.Text.Trim();
                        tabOwner.Update();

                        tabDelegate.Username = txtUsername.Text.Trim();
                        tabDelegate.Update();

                        tabOwnerSr.Username = txtUsername.Text.Trim();
                        tabOwnerSr.Update();

                        tabDelegateSr.Username = txtUsername.Text.Trim();
                        tabDelegateSr.Update();

                        tabOwner.GetOwnerList();       // << อันนี้
                        tabDelegate.GetDelegateList(); // << อันนี้

                        tabOwnerSr.GetOwnerList();
                        tabDelegateSr.GetDelegateList();
                        //SetDept();
                    }
                    else
                    {
                        if (txtStaffId.Text.Trim() == string.Empty)
                        {
                            AppUtil.ClientAlertAndRedirect(Page, "Staff Id not found", "SLM_SCR_017.aspx");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #13
0
ファイル: SLM_SCR_056.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_056");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    InitialControl();
                    if (!string.IsNullOrEmpty(Request["uploadleadid"]))
                    {
                        ((Label)Page.Master.FindControl("lblTopic")).Text = "Upload Lead Management (Edit)";
                        hdfUploadLeadId.Value = Request["uploadleadid"];

                        if (!CheckPrivilege(hdfUploadLeadId.Value))
                        {
                            WriteLogFile(hdfUploadLeadId.Value, ErrorMessage);
                            AppUtil.ClientAlertAndRedirect(Page, ErrorMessage, (RedirectToView ? GetViewPageUrl(hdfUploadLeadId.Value) : SearchPage));
                            return;
                        }

                        if (!LoadLead(hdfUploadLeadId.Value))
                        {
                            WriteLogFile(hdfUploadLeadId.Value, ErrorMessage);

                            if (RedirectToSearch)
                            {
                                AppUtil.ClientAlertAndRedirect(Page, ErrorMessage, SearchPage);
                                return;
                            }
                            else
                            {
                                AppUtil.ClientAlert(Page, ErrorMessage);
                            }
                        }
                    }
                    else
                    {
                        ((Label)Page.Master.FindControl("lblTopic")).Text = "Upload Lead Management";
                    }
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_041");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    ((Label)Page.Master.FindControl("lblTopic")).Text = "นำเข้าข้อมูลผลงาน Telesales";
                    int yr = DateTime.Now.Year;
                    cmbYear.Items.Clear();
                    cmbYearStart.Items.Clear();
                    cmbYearEnd.Items.Clear();

                    cmbYear.Items.Add(new ListItem()
                    {
                        Text = "กรุณาระบุปี", Value = "0"
                    });
                    cmbYearStart.Items.Add(new ListItem()
                    {
                        Text = "ทั้งหมด", Value = "0"
                    });
                    cmbYearEnd.Items.Add(new ListItem()
                    {
                        Text = "ทั้งหมด", Value = "0"
                    });

                    for (int i = yr; i > yr - 10; i--)
                    {
                        cmbYear.Items.Add(i.ToString());
                        cmbYearStart.Items.Add(i.ToString());
                        cmbYearEnd.Items.Add(i.ToString());
                    }

                    //disable all controls;
                    SetActiveInActiveSearchCriteria(true);
                    //Default Search
                    pnlResult.Visible = true;
                    doGetList(0);
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #15
0
ファイル: SLM_SCR_032.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_032");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    int lot = 0;
                    int.TryParse(Request["lot"], out lot);

                    initControl();

                    if (lot <= 0)
                    {
                        tabMain.Visible = false;
                        upNoLot.Visible = true;
                        pcNoLot_PageChange(null, null);
                        btnReject.Visible = false;
                        btnSavePopupChangeOwner.Visible = false;
                        btnExportExcel.Visible          = false;
                        btnConfirm.Visible = false;
                    }
                    else
                    {
                        SlmScr032Biz biz = new SlmScr032Biz();
                        if (!biz.CheckAccess(lot))
                        {
                            AppUtil.ClientAlertAndRedirect(Page, biz.ErrorMessage, "SLM_SCR_047.aspx");
                            return;
                        }

                        tabMain.Visible = true;
                        upNoLot.Visible = false;
                    }
                    pcSuccess_PageChange(null, null);
                    pcDedup_PageChange(null, null);
                    pcBlacklist_PageChange(null, null);
                    pcExceptional_PageChange(null, null);
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #16
0
        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");
            }
        }
コード例 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    CampaignId = "";
                    ((Label)Page.Master.FindControl("lblTopic")).Text = "เพิ่มข้อมูล Lead (Add)";

                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_010");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                    }


                    //รับค่า Seaaion มากจากหน้า viewlead, ปุ่ม คัดลอกข้อมูลผู้มุ่งหวัง
                    if (Session["ticket_id"] != null)
                    {
                        hdfCopyTicket.Value = Session["ticket_id"] as string;
                        Session.Remove("ticket_id");

                        // load default data
                        //var ticketid = Session["ticket_id"] as string;
                        //LeadData lead = SlmScr010Biz.GetLeadData(ticketid);
                        // Session["ticket_id"] = null;
                        LeadData lead = SlmScr010Biz.GetLeadData(hdfCopyTicket.Value);
                        lead.Delegate        = "";
                        lead.Delegate_Branch = "";
                        lead.Delegate_Flag   = 0;

                        if (lead != null)
                        {
                            //CampaignId = lead.CampaignId;
                            ctlCommon.SetLeadData(lead, true, true);

                            //LoadDetailControl();
                            //ctlLead.LoadData(lead);
                        }
                    }
                    ctlCommon.SetControlMode(Lead_Detail_Master.CtlMode.New);
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #18
0
ファイル: SLM_SCR_057.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_057");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    if (!string.IsNullOrEmpty(Request["uploadleadid"]))
                    {
                        InitialControl();
                        hdfUploadLeadId.Value = Request["uploadleadid"];

                        if (!LoadLead(hdfUploadLeadId.Value))
                        {
                            WriteLogFile(hdfUploadLeadId.Value, ErrorMessage);
                            if (RedirectToSearch)
                            {
                                AppUtil.ClientAlertAndRedirect(Page, ErrorMessage, SearchPage);
                                return;
                            }
                            else
                            {
                                AppUtil.ClientAlert(Page, ErrorMessage);
                            }
                        }
                    }
                    else
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "ไม่พบข้อมูล Upload ID", SearchPage);
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlertAndRedirect(Page, message, SearchPage);
            }
        }
コード例 #19
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            ((Label)Page.Master.FindControl("lblTopic")).Text = "ข้อมูลกำหนดรถ Premium";
            Page.Form.DefaultButton = btnSearch.UniqueID;

            ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_063");

            if (priData == null || priData.IsView != 1)
            {
                AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
            }

            AppUtil.BuildCombo(cmbDBrand, SlmScr063Biz.GetBrandData(), "กรุณาระบุ");

            _log = LogManager.GetLogger(this.GetType());
        }
コード例 #20
0
ファイル: SLM_SCR_038.aspx.cs プロジェクト: KKPBank/SLM
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            ((Label)Page.Master.FindControl("lblTopic")).Text = "จัดการข้อมูล Team Telesales";
            Page.Form.DefaultButton = btnSearch.UniqueID;

            ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_038");

            if (priData == null || priData.IsView != 1)
            {
                AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
            }


            AppUtil.BuildCombo(cmbTeamHeader, SlmScr038Biz.GetStaffsListHeader(), "ทั้งหมด");
            //AppUtil.BuildCombo(cmbDHeader, SlmScr038Biz.GetStaffsList(), "ระบุ");
            _log = LogManager.GetLogger(this.GetType());
        }
コード例 #21
0
ファイル: SLM_SCR_062.aspx.cs プロジェクト: KKPBank/SLM
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            AppUtil.SetNumbericCharacter(txtDDiscountValue);
            ((Label)Page.Master.FindControl("lblTopic")).Text = "ข้อมูลกำหนดส่วนลดตาม Role";
            Page.Form.DefaultButton = btnSearch.UniqueID;

            ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_062");

            if (priData == null || priData.IsView != 1)
            {
                AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
            }

            AppUtil.BuildCombo(cmbSRole, SlmScr062Biz.GetStaffTypeData(false, 0), "ทั้งหมด");

            _log = LogManager.GetLogger(this.GetType());
        }
コード例 #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ((Label)Page.Master.FindControl("lblTopic")).Text = "เพิ่มข้อมูล Lead (Add)";

                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_010");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                    }
                }
            }
            catch (Exception ex)
            {
                AppUtil.ClientAlert(Page, ex.InnerException != null ? ex.InnerException.Message : ex.Message);
            }
        }
コード例 #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "COC_SCR_007");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "COC_SCR_002.aspx");
                        return;
                    }

                    if (Session[coc_staffid] != null)
                    {
                        txtStaffId.Text = Session[coc_staffid].ToString();
                        InitialControl();
                        LoadStaffData();
                        CheckConditionOper();
                        SetDept();

                        //งานค้างในมือ
                        GetStaffByTeam(txtCurrentCocTeam.Text.Trim());  //set ค่า txtCurrentCocTeam.Text ใน Method LoadStaffData();
                        GetJobOnHandList();
                    }
                    else
                    {
                        if (txtStaffId.Text.Trim() == string.Empty)
                        {
                            AppUtil.ClientAlertAndRedirect(Page, "Staff Id not found", "COC_SCR_006.aspx");
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Debug(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_031");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    ((Label)Page.Master.FindControl("lblTopic")).Text = "จัดการข้อมูลเลขรับแจ้ง";
//                    cmbProductSearch.DataSource = ProductBiz.GetProductList();
                    cmbProductSearch.DataSource = ProductBiz.GetProductListNew();
                    cmbProductSearch.DataBind();
                    cmbProductSearch.Items.Insert(0, new ListItem("", "-1"));
                    cmbInsNameSearch.DataSource = ObtScr002Biz.GetInsCom();
                    cmbInsNameSearch.DataBind();
                    cmbInsNameSearch.Items.Insert(0, new ListItem()
                    {
                        Value = "-1", Text = "ทั้งหมด"
                    });

                    AppUtil.SetNumbericCharacter(textStartReceiveNoNumber);
                    AppUtil.SetNumbericCharacter(textEndReceiveNoNumber);
                    AppUtil.SetNumbericCharacter(textTotalReceiveNoNumber);
                    textStartReceiveNoNumber.Attributes.Add("onblur", "CalcTotalReceiveNo();");
                    textEndReceiveNoNumber.Attributes.Add("onblur", "CalcTotalReceiveNo();");
                    Page.Form.DefaultButton = btnSearch.UniqueID;
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #25
0
ファイル: SLM_SCR_033.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_033");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    ((Label)Page.Master.FindControl("lblTopic")).Text = "นำเข้าข้อมูลโปรโมชั่น";
                    ErrorList = null;
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }
コード例 #26
0
ファイル: SLM_SCR_011.aspx.cs プロジェクト: KKPBank/SLM
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ((Label)Page.Master.FindControl("lblTopic")).Text = "แก้ไขข้อมูล Lead (Edit)";
                    Page.Form.DefaultButton = btnSave.UniqueID;

                    ctlCommon.SetControlMode(Lead_Detail_Master.CtlMode.Edit);

                    if (Request["ticketid"] != null && Request["ticketid"].ToString().Trim() != string.Empty)
                    {
                        CheckTicketIdPrivilege(Request["ticketid"].ToString().Trim());
                    }
                    else
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "Ticket Id not found", "SLM_SCR_003.aspx");
                        return;
                    }

                    if (!string.IsNullOrEmpty(Request["ticketid"]))
                    {
                        var      ticketid = Request["ticketid"];
                        LeadData lead     = SlmScr010Biz.GetLeadData(ticketid);
                        if (lead == null)
                        {
                            AppUtil.ClientAlertAndRedirect(Page, "ไม่พบ Ticket Id " + ticketid + " ในระบบ", "SLM_SCR_003.aspx");
                            return;
                        }


                        if (!CheckTicketCloseOrTicketCOC(lead))
                        {
                            return;
                        }

                        CampaignId = lead.CampaignId;
                        ctlCommon.SetLeadData(lead);
                        LoadDetailControl();
                        ctlLead.LoadData(lead);

                        //InitialControl();
                        //SetScript();
                    }
                    else
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "Ticket Id not found", "SLM_SCR_003.aspx");
                        return;
                    }

                    ScreenPrivilegeData priData = RoleBiz.GetScreenPrivilege(HttpContext.Current.User.Identity.Name, "SLM_SCR_011");
                    if (priData == null || priData.IsView != 1)
                    {
                        AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                        return;
                    }

                    //Check สิทธิ์ภัทรในการเข้าใช้งาน
                    StaffData staff = StaffBiz.GetStaff(HttpContext.Current.User.Identity.Name);
                    ConfigBranchPrivilegeData data = ConfigBranchPrivilegeBiz.GetConfigBranchPrivilege(staff.BranchCode);
                    if (data != null)
                    {
                        if (data.IsEdit != null && data.IsEdit.Value == false)
                        {
                            AppUtil.ClientAlertAndRedirect(Page, "คุณไม่มีสิทธิ์เข้าใช้หน้าจอนี้", "SLM_SCR_003.aspx");
                            return;
                        }
                    }
                    //------------------------------------------------------------------------------------------------------
                }
            }
            catch (Exception ex)
            {
                string message = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                _log.Error(message);
                AppUtil.ClientAlert(Page, message);
            }
        }