예제 #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;
                DM_TEMP_CUM objTempCum = new DM_TEMP_CUM();
                ret = processDanhMuc.Cum02(action, ref obj, ref objTempCum, 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;
            }
        }
예제 #2
0
        public void OnAddNew(DM_CUM obj)
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                DanhMucProcess processDanhMuc = new DanhMucProcess();
                List <ClientResponseDetail> listClientResponseDetail = new List <ClientResponseDetail>();
                bool ret = false;

                DM_TEMP_CUM objTempCum = new DM_TEMP_CUM();
                ret = processDanhMuc.Cum02(DatabaseConstant.Action.THEM, ref obj, ref objTempCum, ref listClientResponseDetail);
                AfterAddNew(ret, obj, listClientResponseDetail);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
            }
        }
예제 #3
0
        private void SetFormData()
        {
            DanhMucProcess processDanhMuc = new DanhMucProcess();

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

            obj = new DM_CUM();
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                bool ret = false;
                obj.ID = id;
                DM_TEMP_CUM objTempCum = new DM_TEMP_CUM();
                ret = processDanhMuc.Cum02(DatabaseConstant.Action.LOAD, ref obj, ref objTempCum, 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)));
                    cmbPhongGiaoDich_SelectionChanged(null, null);
                    cmbKhuVuc.SelectedIndex = lstSourceKhuVuc.IndexOf(lstSourceKhuVuc.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_KVUC)));
                    txtMaCum.Text           = obj.MA_CUM;
                    txtTenCum.Text          = obj.TEN_CUM;
                    txtTenTat.Text          = obj.TEN_TAT;
                    if (LDateTime.IsDate(obj.NGAY_TLAP, "yyyyMMdd"))
                    {
                        raddtNgayThanhLap.Value = LDateTime.StringToDate(obj.NGAY_TLAP, "yyyyMMdd");
                    }
                    cmbCBQL.SelectedIndex = lstSourceCBQL.IndexOf(lstSourceCBQL.FirstOrDefault(e => e.KeywordStrings.First().Equals(obj.MA_CBO_QLY)));
                    if (obj.LOAI_CUM_TRUONG.Equals("KHTV"))
                    {
                        chkCumTruongLaKHTV.IsChecked = true;
                    }
                    else
                    {
                        chkCumTruongLaKHTV.IsChecked = false;
                    }
                    txtCumTruong.Text = obj.MA_CUM_TRUONG;
                    if (objTempCum != null)
                    {
                        txtTenCumTruong.Text = objTempCum.TEN_CUM_TRUONG;
                    }
                    #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;
            }
        }