Beispiel #1
0
        public void OnDelete()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>();
            DanhMucProcess processDanhMuc = new DanhMucProcess();

            try
            {
                bool ret = false;
                obj.ID = id;
                ret    = processDanhMuc.KhuVuc02(action, ref obj, ref listClientResponseDetail);
                AfterDelete(ret, listClientResponseDetail);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                Mouse.OverrideCursor     = Cursors.Arrow;
                listClientResponseDetail = null;
                processDanhMuc           = null;
            }
        }
Beispiel #2
0
        private void SetFormData()
        {
            DanhMucProcess processDanhMuc = new DanhMucProcess();

            List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>();

            obj = new DM_KHU_VUC();
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                bool ret = false;
                obj.ID = id;
                ret    = processDanhMuc.KhuVuc02(DatabaseConstant.Action.LOAD, ref obj, ref listClientResponseDetail);
                if (ret == true)
                {
                    sTrangThaiNVu        = obj.TTHAI_NVU;
                    lblTrangThai.Content = BusinessConstant.layNgonNguNghiepVu(sTrangThaiNVu);

                    #region Thông tin chung
                    cmbChiNhanh.SelectedIndex      = lstSourceChiNhanh.IndexOf(lstSourceChiNhanh.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_DVI_QLY)));
                    cmbPhongGiaoDich.SelectedIndex = lstSourcePhongGiaoDich.IndexOf(lstSourcePhongGiaoDich.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_DVI)));
                    txtMaKhuVuc.Text      = obj.MA_KVUC;
                    txtTenKhuVuc.Text     = obj.TEN_KVUC;
                    txtTenTat.Text        = obj.TEN_TAT;
                    cmbCBQL.SelectedIndex = lstSourceCBQL.IndexOf(lstSourceCBQL.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_CBO_QLY)));
                    #endregion

                    #region Thông tin kiểm soát
                    txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);
                    raddtNgayLap.Value      = LDateTime.StringToDate(obj.NGAY_NHAP, "yyyyMMdd");
                    txtNguoiLap.Text        = obj.NGUOI_NHAP;
                    if (LDateTime.IsDate(obj.NGAY_CNHAT, "yyyyMMdd") == true)
                    {
                        raddtNgayCapNhat.Value = LDateTime.StringToDate(obj.NGAY_CNHAT, "yyyyMMdd");
                    }
                    txtNguoiCapNhat.Text = obj.NGUOI_CNHAT;
                    #endregion
                }
                else
                {
                    LMessage.ShowMessage("M_ResponseMessage_HanhDong_LayDuLieuKhongThanhCong", LMessage.MessageBoxType.Warning);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                LMessage.ShowMessage("M_ResponseMessage_HanhDong_LayDuLieuKhongThanhCong", LMessage.MessageBoxType.Warning);
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
            }
        }
Beispiel #3
0
        public void OnModify(DM_KHU_VUC obj)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                DanhMucProcess processDanhMuc = new DanhMucProcess();
                List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>();
                bool ret = false;

                ret = processDanhMuc.KhuVuc02(DatabaseConstant.Action.SUA, ref obj, ref listClientResponseDetail);
                AfterModify(ret, obj, listClientResponseDetail);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
            }
        }