示例#1
0
        private void SetData(kkslm_ms_discount ds)
        {
            AppUtil.BuildCombo(cmbDRole, SlmScr062Biz.GetStaffTypeData(true, ds.slm_StaffTypeId.Value), "กรุณาระบุ");
            hdfID.Value = ds.slm_Discount_Id.ToString();
            AppUtil.SetComboValue(cmbDRole, ds.slm_StaffTypeId.ToString());
            rdoInsuranceType.SelectedIndex = rdoInsuranceType.Items.IndexOf(rdoInsuranceType.Items.FindByValue(ds.slm_InsuranceTypeCode));
            #region Add by First 21/11/2559
            rdoInsuranceType.Enabled = false;
            #endregion


            if (ds.slm_DiscountPercent > 0)
            {
                rdoDiscount.SelectedIndex = 0;
                txtDDiscountValue.Text    = ds.slm_DiscountPercent.Value.ToString();
            }
            else if (ds.slm_DiscountBath > 0)
            {
                rdoDiscount.SelectedIndex = 1;
                txtDDiscountValue.Text    = ds.slm_DiscountBath.Value.ToString();
            }
            else
            {
                rdoDiscount.SelectedIndex = 0;
                txtDDiscountValue.Text    = "0";
            }
            rdoDStatus.SelectedIndex = rdoDStatus.Items.IndexOf(rdoDStatus.Items.FindByValue(ds.is_Deleted.ToString()));
            cmbDRole.Enabled         = false;
            updModal.Update();
        }
示例#2
0
 private void ClearData()
 {
     AppUtil.BuildCombo(cmbDRole, SlmScr062Biz.GetStaffTypeData(true, 0), "กรุณาระบุ");
     hdfID.Value                    = "";
     cmbDRole.SelectedIndex         = -1;
     rdoInsuranceType.SelectedIndex = -1;
     rdoInsuranceType.Enabled       = true;
     rdoDiscount.SelectedIndex      = 0;
     txtDDiscountValue.Text         = "";
     rdoDStatus.SelectedIndex       = 0;
     cmbDRole.Enabled               = true;
     rdoInsuranceType.Enabled       = true;
     updModal.Update();
 }
示例#3
0
        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());
        }