コード例 #1
0
        /// <summary>
        /// Trước khi xem
        /// </summary>
        private void BeforeView()
        {
            try
            {
                List <DataRowView> listDataRow = getListSeletedDataRow();
                int id;

                if (listDataRow != null)
                {
                    if (listDataRow.Count == 0)
                    {
                        LMessage.ShowMessage("M.DungChung.ChuaChonBanGhi", LMessage.MessageBoxType.Warning);
                        return;
                    }
                    else if (listDataRow.Count > 1)
                    {
                        LMessage.ShowMessage("M.DungChung.KhongDuocChonNhieu", LMessage.MessageBoxType.Warning);
                        return;
                    }
                    else
                    {
                        currentPage     = grid.Items.PageIndex;
                        currentPosition = grid.Items.CurrentPosition;
                        currentID       = int.Parse(listDataRow.First()["ID"].ToString());
                        OnView(currentID);
                    }
                }
                else
                {
                    LMessage.ShowMessage("M.DungChung.LoiChonDuLieu", LMessage.MessageBoxType.Warning);
                    return;
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
            }
        }
コード例 #2
0
        public void AfterModify(bool ret, NS_DM_HOC_VI obj, List <ClientResponseDetail> listClientResponseDetail)
        {
            try
            {
                if (ret)
                {
                    LMessage.ShowMessage("M.DungChung.CapNhatThanhCong", LMessage.MessageBoxType.Information);

                    trangThaiNVu            = obj.TTHAI_NVU;
                    lblTrangThai.Content    = BusinessConstant.layNgonNguNghiepVu(trangThaiNVu);
                    txtTrangThaiBanGhi.Text = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);
                    raddtNgayCapNhat.Value  = LDateTime.StringToDate(ClientInformation.NgayLamViecHienTai, "yyyyMMdd");
                    txtNguoiCapNhat.Text    = ClientInformation.TenDangNhap;

                    BeforeViewFromDetail();
                }
                else
                {
                    CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                }

                // Yêu cầu Unlock bản ghi cần sửa
                UtilitiesProcess process    = new UtilitiesProcess();
                List <int>       listLockId = new List <int>();
                listLockId.Add(id);

                bool retUnlockData = process.UnlockData(DatabaseConstant.Module.NSTL,
                                                        DatabaseConstant.Function.NS_DM_HOC_VI_CT,
                                                        DatabaseConstant.Table.NS_DM_HOC_VI,
                                                        DatabaseConstant.Action.SUA,
                                                        listLockId);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
        }
コード例 #3
0
        /// <summary>
        /// Sửa
        /// </summary>
        /// <param name="id"></param>
        private void OnModify(int id)
        {
            try
            {
                ucDmLoaiGiayToCT userControl = new ucDmLoaiGiayToCT();

                // Yêu cầu lock bản ghi cần sửa
                UtilitiesProcess process    = new UtilitiesProcess();
                List <int>       listLockId = new List <int>();
                listLockId.Add(id);

                bool ret = process.LockData(DatabaseConstant.Module.NSTL,
                                            DatabaseConstant.Function.NS_DM_LOAI_GTO_CT,
                                            DatabaseConstant.Table.NS_DM_LOAI_GTO,
                                            DatabaseConstant.Action.SUA,
                                            listLockId);
                if (ret)
                {
                    userControl.OnSavingCompleted += new EventHandler(userControl_OnSavingCompleted);
                    userControl.Action             = DatabaseConstant.Action.SUA;
                    userControl.ID = id;

                    Window window = new Window();
                    window.Title = DatabaseConstant.layNgonNguTieuDeForm(DatabaseConstant.Function.NS_DM_LOAI_GTO_CT);
                    window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    window.Content = userControl;
                    window.ShowDialog();
                }
                else
                {
                    LMessage.ShowMessage("M.ResponseMessage.Common.LockDataInvalid", LMessage.MessageBoxType.Information);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
            }
        }
コード例 #4
0
        /// <summary>
        /// Sự kiện load dữ liệu lên form
        /// </summary>
        private void LoadForm()
        {
            DanhMucProcess danhmucProcess = new DanhMucProcess();

            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                if (idPhanHeGD != 0)
                {
                    //Sự kiện load dữ liệu
                    DataSet dsPhanHeGD = danhmucProcess.getDanhSachPhanHeGDTheoID(idPhanHeGD);
                    if (dsPhanHeGD != null && dsPhanHeGD.Tables.Count > 0)
                    {
                        DataTable dtPhanHeGD = danhmucProcess.getDanhSachPhanHeGDTheoID(idPhanHeGD).Tables[0];
                        if (dtPhanHeGD.Rows.Count > 0)
                        {
                            lblTrangThai.Content            = BusinessConstant.layTrangThaiNghiepVu(dtPhanHeGD.Rows[0]["TTHAI_NVU"].ToString());
                            txtMaLoaiGD.Text                = dtPhanHeGD.Rows[0]["MA_LOAI_GDICH"].ToString();
                            txtNgayDuyet.Text               = dtPhanHeGD.Rows[0]["NGAY_CNHAT"].ToString();
                            txtNgayLap.Text                 = dtPhanHeGD.Rows[0]["NGAY_NHAP"].ToString();
                            txtTenLoaiGD.Text               = dtPhanHeGD.Rows[0]["TEN_LOAI_GDICH"].ToString();
                            txtTentat.Text                  = dtPhanHeGD.Rows[0]["TEN_TAT"].ToString();
                            txtTrangThaiBanGhi.Text         = dtPhanHeGD.Rows[0]["TTHAI_BGHI"].ToString();
                            txtNguoiDuyet.Text              = dtPhanHeGD.Rows[0]["NGUOI_CNHAT"].ToString();
                            txtNguoiLap.Text                = dtPhanHeGD.Rows[0]["NGUOI_NHAP"].ToString();
                            cmbPhanHe.SelectedIndex         = lstSourcePhanHe.IndexOf(lstSourcePhanHe.FirstOrDefault(i => i.KeywordStrings.First().Equals(dtPhanHeGD.Rows[0]["MA_PHAN_HE"].ToString())));
                            cmbTrangThaiSDung.SelectedIndex = lstSourceTrangThai.IndexOf(lstSourceTrangThai.FirstOrDefault(i => i.KeywordStrings.First().Equals(dtPhanHeGD.Rows[0]["TTHAI_BGHI"].ToString())));
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
                LMessage.ShowMessage("M.DanhMuc.ucPhanHeGDCT.LoiLoadDuLieu", LMessage.MessageBoxType.Error);
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
            }
            Mouse.OverrideCursor = Cursors.Arrow;
        }
コード例 #5
0
        public List <ThamSoBaoCao> GetParameters()
        {
            if (!Validation())
            {
                LMessage.ShowMessage("Thiếu tham số cho báo cáo.", LMessage.MessageBoxType.Information);
                return(null);
            }

            GetFormData();

            List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>();

            if (MaChiNhanh.Equals("%"))
            {
                foreach (AutoCompleteEntry item in lstSourceChiNhanh)
                {
                    string ma = item.KeywordStrings.First();
                    if (!ma.Equals("%"))
                    {
                        listThamSoBaoCao.Add(new ThamSoBaoCao("@DSChiNhanh", ma, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
                    }
                }
            }
            else
            {
                listThamSoBaoCao.Add(new ThamSoBaoCao("@DSChiNhanh", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            }
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayBaoCao", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@TuNgay", TuNgay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@DenNgay", DenNgay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@LoaiTien", MaLoaiTien, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NguoiGhiSo", ClientInformation.HoTen, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("MaNgonNgu", MaNgonNgu, ApplicationConstant.LoaiThamSoBaoCao.LANG.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("MaDinhDang", MaDinhDang, ApplicationConstant.LoaiThamSoBaoCao.FORMAT.layGiaTri()));

            return(listThamSoBaoCao);
        }
コード例 #6
0
        public List <ThamSoBaoCao> GetParameters()
        {
            if (!Validation())
            {
                LMessage.ShowMessage("Thiếu tham số cho báo cáo.", LMessage.MessageBoxType.Information);
                return(null);
            }

            GetFormData();

            List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>();

            //listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenNguoiLap", TenNguoiLap, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenChiNhanh", TenChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenPGD", TenPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TuNgay", TuNgay, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_DenNgay", DenNgay, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NgayMoSo", TuNgay, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NguoiGhiSo", ClientInformation.HoTen, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NgayBaoCao", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_SoTaiKhoan", SoTaiKhoan, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaChiNhanh", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaPhongGiaoDich", MaPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@TuNgay", TuNgay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@DenNgay", DenNgay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayBaoCao", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            //listThamSoBaoCao.Add(new ThamSoBaoCao("@MaLoaiTien", MaLoaiTien, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@LoaiTK", "TKTH", ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@SoTaiKhoan", SoTaiKhoan, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("@P_MaDonVi", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.GUIPARAM.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("MaNgonNgu", MaNgonNgu, ApplicationConstant.LoaiThamSoBaoCao.LANG.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("MaDinhDang", MaDinhDang, ApplicationConstant.LoaiThamSoBaoCao.FORMAT.layGiaTri()));

            return(listThamSoBaoCao);
        }
コード例 #7
0
        /// <summary>
        /// Trước khi sửa
        /// </summary>
        private void BeforeModify()
        {
            try
            {
                List <NS_DM_DANH_MUC_DTO> listDataRow = getListSeletedDataRow();

                if (listDataRow != null)
                {
                    if (listDataRow.Count == 0)
                    {
                        LMessage.ShowMessage("M.DungChung.ChuaChonBanGhi", LMessage.MessageBoxType.Warning);
                        return;
                    }
                    else if (listDataRow.Count > 1)
                    {
                        LMessage.ShowMessage("M.DungChung.KhongDuocChonNhieu", LMessage.MessageBoxType.Warning);
                        return;
                    }
                    else
                    {
                        currentPage     = grid.Items.PageIndex;
                        currentPosition = grid.Items.CurrentPosition;
                        currentID       = int.Parse(listDataRow.First().ID.ToString());

                        OnModify(currentID);
                    }
                }
                else
                {
                    LMessage.ShowMessage("Lỗi chọn dữ liệu để xử lý", LMessage.MessageBoxType.Warning);
                    return;
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
            }
        }
コード例 #8
0
        public List <ThamSoBaoCao> GetParameters()
        {
            if (!Validation())
            {
                LMessage.ShowMessage("Thiếu tham số cho báo cáo.", LMessage.MessageBoxType.Information);
                return(null);
            }

            GetFormData();

            List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>();

            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenNguoiLap", TenNguoiLap, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaChiNhanh", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenChiNhanh", TenChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaPhongGiaoDich", MaPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenPGD", TenPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@P_MaDonVi", MaDonVi, ApplicationConstant.LoaiThamSoBaoCao.GUIPARAM.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TuNgay", TuNgay.ToString("yyyyMMdd"), ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_DenNgay", DenNgay.ToString("yyyyMMdd"), ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_SoSoTG", SoSoTG, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_MaKhachHang", MaKhachHang, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenKhachHang", TenKhachHang, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_DiaChiKH", DiaChi, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_Tel", SDT, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_SoCMND", SoCMND, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NgayCap", NgayCap, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NGAY_BAO_CAO", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NoiCap", NoiCap, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@P_SoSoTG", SoSoTG, ApplicationConstant.LoaiThamSoBaoCao.GUIPARAM.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@SoSoTG", SoSoTG, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@TuNgay", TuNgay.ToString("yyyyMMdd"), ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@DenNgay", DenNgay.ToString("yyyyMMdd"), ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("MaNgonNgu", MaNgonNgu, ApplicationConstant.LoaiThamSoBaoCao.LANG.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("MaDinhDang", MaDinhDang, ApplicationConstant.LoaiThamSoBaoCao.FORMAT.layGiaTri()));
            return(listThamSoBaoCao);
        }
コード例 #9
0
 private void Save()
 {
     try
     {
         List <ClientResponseDetail> lstClientResponseDetails = new List <ClientResponseDetail>();
         int iret = GetDataForm();
         if (iret > 0)
         {
             iret = new SMSProcess().TinNhanDi(DatabaseConstant.Action.THEM, ref objTinNhanDi,
                                               ref lstClientResponseDetails);
             CommonFunction.ThongBaoKetQua(lstClientResponseDetails);
         }
         else
         {
             LMessage.ShowMessage("M.DungChung.LoiKhongXacDinh", LMessage.MessageBoxType.Error);
         }
     }
     catch (Exception ex)
     {
         LMessage.ShowMessage("M.DungChung.LoiKhongXacDinh", LMessage.MessageBoxType.Error);
         LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
     }
 }
コード例 #10
0
        public void AfterDelete(bool ret, List <ClientResponseDetail> listClientResponseDetail)
        {
            try
            {
                if (ret == true)
                {
                    LMessage.ShowMessage("M.DungChung.XoaThanhCong", LMessage.MessageBoxType.Information);
                }
                else
                {
                    CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                    //LMessage.ShowMessage("M.DungChung.XoaKhongThanhCong", LMessage.MessageBoxType.Warning);
                }

                // Đóng cửa sổ chi tiết sau khi xóa
                OnClose();
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
        }
コード例 #11
0
 private bool Validation()
 {
     try
     {
         if (cmbDoiTuong.SelectedIndex < 0)
         {
             CommonFunction.ThongBaoChuaChon(lblLoaiDTuong.Content.ToString());
             cmbDoiTuong.Focus();
             return(false);
         }
         if (grDSDoiTuong.SelectedItems.Count < 1)
         {
             LMessage.ShowMessage("Chưa chọn đối tượng", LMessage.MessageBoxType.Warning);
             return(false);
         }
         return(true);
     }
     catch (Exception ex)
     {
         LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
         return(false);
     }
 }
コード例 #12
0
        private void Save()
        {
            try
            {
                List <ClientResponseDetail> lstClientResponseDetails = new List <ClientResponseDetail>();
                objTinNhanDen = new TIN_NHAN_DEN();
                List <RECEIVER> lstReceivers = new List <RECEIVER>();
                foreach (RECEIVER objTinNhan in grdTinNhanDenDS.SelectedItems)
                {
                    lstReceivers.Add(objTinNhan);
                }
                objTinNhanDen.DSaReceivers = lstReceivers.ToArray();

                int iret = new SMSProcess().TinNhanDen(DatabaseConstant.Action.THEM, ref objTinNhanDen,
                                                       ref lstClientResponseDetails);
                CommonFunction.ThongBaoKetQua(lstClientResponseDetails);
            }
            catch (Exception ex)
            {
                LMessage.ShowMessage("M.DungChung.LoiKhongXacDinh", LMessage.MessageBoxType.Error);
                LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
            }
        }
コード例 #13
0
        public List <ThamSoBaoCao> GetParameters()
        {
            if (!Validation())
            {
                LMessage.ShowMessage("Thiếu tham số cho báo cáo.", LMessage.MessageBoxType.Information);
                return(null);
            }

            GetFormData();

            List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>();

            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenNguoiLap", TenNguoiLap, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenChiNhanh", TenChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenPGD", TenPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_Thang", raddtThang.Text, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NgayBaoCao", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaChiNhanh", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaPhongGD", MaPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@ThangTinhPhuCap", thangTinhPhuCap, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));

            return(listThamSoBaoCao);
        }
コード例 #14
0
        public List <ThamSoBaoCao> GetParameters()
        {
            if (!Validation())
            {
                LMessage.ShowMessage("Thiếu tham số cho báo cáo.", LMessage.MessageBoxType.Information);
                return(null);
            }

            GetFormData();

            List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>();

            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenNguoiLap", TenNguoiLap, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaChiNhanh", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaPhongGiaoDich", MaPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayBaoCao", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaKhachHang", MaKhachHang, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("MaNgonNgu", MaNgonNgu, ApplicationConstant.LoaiThamSoBaoCao.LANG.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("MaDinhDang", MaDinhDang, ApplicationConstant.LoaiThamSoBaoCao.FORMAT.layGiaTri()));

            return(listThamSoBaoCao);
        }
コード例 #15
0
 public void LoadDocumentFirst()
 {
     this.Title = "mFinance - " + title;
     using (Stream stream = LFile.GetStreamDataFromFile(GetResourceUri(filePath)))
     {
         if (stream.IsNullOrEmpty())
         {
             LMessage.ShowMessage("M.DungChung.ThongBao.TaiLieuDangDuocPhatTrien", LMessage.MessageBoxType.Information);
             this.docViewer.Document = null;
             return;
         }
         if (stream.Length == 0)
         {
             LMessage.ShowMessage("M.DungChung.ThongBao.TaiLieuDangDuocPhatTrien", LMessage.MessageBoxType.Information);
             this.docViewer.Document = null;
             return;
         }
         else
         {
             UpdatePdfViewer(stream);
         }
     }
 }
コード例 #16
0
 private void grvDanhSachHDTD_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         Mouse.OverrideCursor = Cursors.Wait;
         DataRowView drv = (DataRowView)grvDanhSachHDTD.SelectedItem;
         DataSet     ds  = new KhaiThacDuLieuProcess().GetThongTinDanhSachKUOC(Convert.ToInt32(drv["ID"]), drv["MA_HDTDVM"].ToString());
         if (!LObject.IsNullOrEmpty(ds.Tables) && ds.Tables.Count > 0)
         {
             grvDanhSachKUVM.ItemsSource = ds.Tables["DANHSACH.KUOCVM"].DefaultView;
         }
     }
     catch (System.Exception ex)
     {
         LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
         LMessage.ShowMessage("M.DungChung.LoiChung", LMessage.MessageBoxType.Error);
     }
     finally
     {
         grvKheUocGD.ItemsSource = null;
         Mouse.OverrideCursor    = Cursors.Arrow;
     }
 }
コード例 #17
0
        /// <summary>
        /// Xử lý sự kiện sửa
        /// </summary>
        private void Sua()
        {
            DataRowView dr = (DataRowView)grKhachHangDS.SelectedItem;

            if (dr == null)
            {
                LMessage.ShowMessage("M.DungChung.ChuaChonBanGhi", LMessage.MessageBoxType.Warning);
                return;
            }
            else
            {
                Window    window = new Window();
                KIEM_SOAT obj    = new KIEM_SOAT();
                obj.action = DatabaseConstant.Action.SUA;
                obj.ID     = Convert.ToInt32(dr["ID"]);
                ucHanMucTong uc = new ucHanMucTong(obj);
                window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                window.Title   = DatabaseConstant.layNgonNguTieuDeForm(DatabaseConstant.Function.HM_TONG);
                window.Content = uc;
                window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                window.ShowDialog();
            }
        }
コード例 #18
0
 private void BeforDelete(bool bKetQua, List <ClientResponseDetail> listClientResponseDetail)
 {
     try
     {
         if (bKetQua)
         {
             CommonFunction.ThongBaoKetQua(listClientResponseDetail);
             CommonFunction.CloseUserControl(this);
         }
         else
         {
             LMessage.ShowMessage("M.DungChung.LoiXoaDuLieu", LMessage.MessageBoxType.Error);
         }
     }
     catch (System.Exception ex)
     {
         LMessage.ShowMessage("M.DungChung.LoiChung", LMessage.MessageBoxType.Error);
         LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
     }
     finally
     {
     }
 }
コード例 #19
0
        public void AfterAddNew(bool ret, List <ClientResponseDetail> listClientResponseDetail)
        {
            try
            {
                if (ret)
                {
                    LMessage.ShowMessage("M.DungChung.ThemThanhCong", LMessage.MessageBoxType.Information);


                    sTrangThaiNVu = BusinessConstant.TrangThaiNghiepVu.DA_DUYET.layGiaTri();
                    BeforeViewFromDetail();
                }
                else
                {
                    CommonFunction.ThongBaoKetQua(listClientResponseDetail);
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                throw ex;
            }
        }
コード例 #20
0
        public List <ThamSoBaoCao> GetParameters()
        {
            if (!Validation())
            {
                LMessage.ShowMessage("Thiếu tham số cho báo cáo.", LMessage.MessageBoxType.Information);
                return(null);
            }

            GetFormData();

            List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>();

            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenNguoiLap", TenNguoiLap, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NgayThangNam", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_NgayDuLieu", NgayChotSoLieu, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenChiNhanh", TenChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_TenPGD", TenPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("P_MaLoaiTien", MaLoaiTien, ApplicationConstant.LoaiThamSoBaoCao.GUI.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaChiNhanh", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaPhongGiaoDich", MaPhongGiaoDich, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaCum", MaCum, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@SapXep", SapXep, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayChotSoLieu", NgayChotSoLieu, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NhomNo", NhomNo, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@LoaiTSDB", LoaiTSDB, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NguonVonChoVay", NguonVonChoVay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MucDichVay", MucDichVay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@TieuChiNhom", TieuChiNhom, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@MaLoaiTien", MaLoaiTien, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@LoaiBC", "NH", ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("MaNgonNgu", MaNgonNgu, ApplicationConstant.LoaiThamSoBaoCao.LANG.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("MaDinhDang", MaDinhDang, ApplicationConstant.LoaiThamSoBaoCao.FORMAT.layGiaTri()));

            return(listThamSoBaoCao);
        }
コード例 #21
0
        /// <summary>
        /// Sau khi sửa
        /// </summary>
        /// <param name="ret"></param>
        private void afterModify(ApplicationConstant.ResponseStatus ret, HT_NHNSD obj, string responseMessage)
        {
            if (ret == ApplicationConstant.ResponseStatus.THANH_CONG)
            {
                LMessage.ShowMessage("M.DungChung.CapNhatThanhCong", LMessage.MessageBoxType.Information);

                id       = obj.ID;
                TthaiNvu = obj.TTHAI_NVU;

                lblTrangThai.Content = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);
                txtTrangThai.Text    = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);
                raddtNgayNhap.Value  = LDateTime.StringToDate(obj.NGAY_NHAP, "yyyyMMdd");
                txtNguoiLap.Text     = obj.NGUOI_NHAP;
                raddtNgayCNhat.Value = LDateTime.StringToDate(obj.NGAY_CNHAT, "yyyyMMdd");
                txtNguoiCapNhat.Text = obj.NGUOI_CNHAT;
                CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, tthaiNvu, mnuMain, DatabaseConstant.Function.HT_NHNSD);

                formCase = "XEM";
                HideControl();
            }
            else
            {
                LMessage.ShowMessage(responseMessage, LMessage.MessageBoxType.Error);
            }

            // Yêu cầu Unlock bản ghi cần sửa
            UtilitiesProcess process    = new UtilitiesProcess();
            List <int>       listLockId = new List <int>();

            listLockId.Add(id);

            bool retUnlockData = process.UnlockData(DatabaseConstant.Module.QTHT,
                                                    DatabaseConstant.Function.HT_NHNSD,
                                                    DatabaseConstant.Table.HT_NHNSD,
                                                    DatabaseConstant.Action.SUA,
                                                    listLockId);
        }
コード例 #22
0
        private void LuuTrangThai(DatabaseConstant.Action action)
        {
            QuanTriHeThongProcess process = new QuanTriHeThongProcess();

            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                List <int> lstID = new List <int>();
                foreach (var row in grDanhSach.SelectedItems)
                {
                    if (row is DataRow)
                    {
                        if ((int)((DataRow)row)[0] > 0)
                        {
                            lstID.Add((int)((DataRow)row)[0]);
                        }
                    }
                    else
                    {
                        if ((int)((DataRow)row)[0] > 0)
                        {
                            lstID.Add((int)((DataRow)row)[0]);
                        }
                    }
                }
                string loaiDoiTuong = ((RadTreeViewItem)tvwTree.SelectedItem).Tag.ToString();
                LMessage.ShowMessage("M.DungChung.LuuDuLieuThanhCong", LMessage.MessageBoxType.Information);
                BuildGridDoiTuong();
                loadWidthColumnDoiTuong();
            }
            catch (System.Exception ex)
            {
                CommonFunction.ThongBaoLoi(ex);
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
            }
            Mouse.OverrideCursor = Cursors.Arrow;
        }
コード例 #23
0
        /// <summary>
        /// Xử lý xóa dữ liệu
        /// </summary>
        private void Xoa()
        {
            DanhMucProcess danhmucProcess = new Presentation.Process.DanhMucProcess();

            try
            {
                if (grDanhSach.SelectedItems.Count > 0)
                {
                    int[] arrid = new int[grDanhSach.SelectedItems.Count];
                    List <ClientResponseDetail> listResponseDetail = new List <ClientResponseDetail>();

                    for (int i = 0; i < grDanhSach.SelectedItems.Count; i++)
                    {
                        DataRow dtr = (DataRow)grDanhSach.SelectedItems[i];
                        arrid[i] = int.Parse(dtr[1].ToString());
                    }
                    if (danhmucProcess.XoaTinhTP(arrid.ToArray(), ref listResponseDetail))
                    {
                        LMessage.ShowMessage("M.DungChung.XoaThanhCong", LMessage.MessageBoxType.Information);
                        LoadDuLieu();
                    }
                    else
                    {
                        LMessage.ShowMessage("M.DungChung.XoaKhongThanhCong", LMessage.MessageBoxType.Error);
                    }
                }
                else
                {
                    LMessage.ShowMessage("M.DungChung.ChuaChonBanGhi", LMessage.MessageBoxType.Warning);
                    return;
                }
            }
            catch (Exception ex)
            {
            }
            danhmucProcess = null;
        }
コード例 #24
0
 /// <summary>
 /// Sự kiện double click trên data grid
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void grKhachHangDS_MouseDoubleClick(object sender, MouseButtonEventArgs e)
 {
     try
     {
         Mouse.OverrideCursor = Cursors.Wait;
         DataRowView drv = (DataRowView)grKhachHangDS.SelectedItem;
         DataSet     ds  = new KhaiThacDuLieuProcess().GetThongTinCoBanKhachHang(Convert.ToInt32(drv["ID"]), drv["MA_KHANG"].ToString());
         txtMaKhachHangGD.Text   = drv["MA_KHANG"].ToString();
         txtTenKhachHangGD.Text  = drv["TEN_KHANG"].ToString();
         txtMaKhachHangTD.Text   = drv["MA_KHANG"].ToString();
         txtTenKhachHangTD.Text  = drv["TEN_KHANG"].ToString();
         txtMaKhachHangHDV.Text  = drv["MA_KHANG"].ToString();
         txtTenKhachHangHDV.Text = drv["TEN_KHANG"].ToString();
         if (!LObject.IsNullOrEmpty(ds.Tables) && ds.Tables.Count > 0)
         {
             grKhachHangGD.ItemsSource   = ds.Tables["DANHSACH.GIAODICH"].DefaultView;
             grvDanhSachHDTD.ItemsSource = ds.Tables["DANHSACH.HDTDVM"].DefaultView;
             grvDanhSachHDV.ItemsSource  = ds.Tables["DANHSACH.SOTK"].DefaultView;
             tiTinDung.IsSelected        = true;
         }
     }
     catch (System.Exception ex)
     {
         grKhachHangGD.ItemsSource   = null;
         grvDanhSachHDTD.ItemsSource = null;
         grvDanhSachHDV.ItemsSource  = null;
         LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
         LMessage.ShowMessage("M.DungChung.LoiChung", LMessage.MessageBoxType.Error);
     }
     finally
     {
         grvKheUocGD.ItemsSource     = null;
         grvDanhSachKUVM.ItemsSource = null;
         grvHuyDongGD.ItemsSource    = null;
         Mouse.OverrideCursor        = Cursors.Arrow;
     }
 }
コード例 #25
0
 private void Them()
 {
     try
     {
         if (cmbPort.IsEnabled)
         {
             List <ClientResponseDetail> lstClientResponseDetails = new List <ClientResponseDetail>();
             int iret = GetDataForm();
             if (iret > 0)
             {
                 iret = new SMSProcess().Modem(DatabaseConstant.Action.THEM, ref lstModems,
                                               ref lstClientResponseDetails);
                 CommonFunction.ThongBaoKetQua(lstClientResponseDetails);
                 if (iret > 0)
                 {
                     cmbPort.IsEnabled    = false;
                     tthai                = BusinessConstant.CoKhong.CO.layGiaTri();
                     lblTrangThai.Content = LLanguage.SearchResourceByKey("U.DMUC_GTRI.CO_KHONG.CO");
                     tlbExecute.IsEnabled = true;
                 }
             }
             else
             {
                 LMessage.ShowMessage("M.DungChung.LoiKhongXacDinh", LMessage.MessageBoxType.Error);
             }
         }
         else
         {
             ClearForm();
         }
     }
     catch (Exception ex)
     {
         LMessage.ShowMessage("M.DungChung.LoiKhongXacDinh", LMessage.MessageBoxType.Error);
         LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
     }
 }
コード例 #26
0
        public List <ThamSoBaoCao> GetParameters()
        {
            if (!Validation())
            {
                LMessage.ShowMessage("Thiếu tham số cho báo cáo.", LMessage.MessageBoxType.Information);
                return(null);
            }

            GetFormData();
            List <ThamSoBaoCao> listThamSoBaoCao = new List <ThamSoBaoCao>();

            listThamSoBaoCao.Add(new ThamSoBaoCao("@DSChiNhanh", MaChiNhanh, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NgayBaoCao", NgayBaoCao, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@TuNgay", TuNgay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@DenNgay", DenNgay, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@LoaiTien", "VND", ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@DonViTinh", "1", ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("@NguoiLap", ClientInformation.HoTen, ApplicationConstant.LoaiThamSoBaoCao.SQL.layGiaTri()));

            listThamSoBaoCao.Add(new ThamSoBaoCao("MaNgonNgu", MaNgonNgu, ApplicationConstant.LoaiThamSoBaoCao.LANG.layGiaTri()));
            listThamSoBaoCao.Add(new ThamSoBaoCao("MaDinhDang", MaDinhDang, ApplicationConstant.LoaiThamSoBaoCao.FORMAT.layGiaTri()));

            return(listThamSoBaoCao);
        }
コード例 #27
0
        /// <summary>
        /// Sau khi thêm mới
        /// </summary>
        /// <param name="ret"></param>
        private void afterAddNew(ApplicationConstant.ResponseStatus ret, HT_NHNSD obj, string responseMessage)
        {
            if (ret == ApplicationConstant.ResponseStatus.THANH_CONG)
            {
                LMessage.ShowMessage("M.DungChung.ThemThanhCong", LMessage.MessageBoxType.Information);

                if (cbMultiAdd.IsChecked == true)
                {
                    ResetForm();
                }
                else if (!DatabaseConstant.CLOSE_DETAIL_FORM)
                {
                    id       = obj.ID;
                    TthaiNvu = obj.TTHAI_NVU;

                    lblLabelTrangThai.Content = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);
                    txtTrangThai.Text         = BusinessConstant.layNgonNguSuDung(obj.TTHAI_BGHI);
                    raddtNgayNhap.Value       = LDateTime.StringToDate(obj.NGAY_NHAP, "yyyyMMdd");
                    txtNguoiLap.Text          = obj.NGUOI_NHAP;
                    raddtNgayCNhat.Value      = LDateTime.StringToDate(obj.NGAY_CNHAT, "yyyyMMdd");
                    txtNguoiCapNhat.Text      = obj.NGUOI_CNHAT;
                    CommonFunction.RefreshButton(Toolbar, DatabaseConstant.Action.XEM, tthaiNvu, mnuMain, DatabaseConstant.Function.HT_NHNSD);

                    formCase = "XEM";
                    HideControl();
                }
                else
                {
                    onClose();
                }
            }
            else
            {
                LMessage.ShowMessage(responseMessage, LMessage.MessageBoxType.Error);
            }
        }
コード例 #28
0
 private void Xem()
 {
     if (!tlbView.IsEnabled)
     {
         return;
     }
     Cursor = System.Windows.Input.Cursors.Wait;
     if (grdTinNhanDenDS.SelectedItems.Count == 1)
     {
         MODEM       modem        = grdTinNhanDenDS.SelectedItem as MODEM;
         ucThietBiCT objThietBiCt = new ucThietBiCT(modem);
         string      tittle       = DatabaseConstant.layNgonNguTieuDeForm(DatabaseConstant.Function.SMS_QUAN_LY_KET_NOI);
         Window      window       = new Window();
         window.Title = tittle;
         window.WindowStartupLocation = WindowStartupLocation.CenterScreen;
         window.Content = objThietBiCt;
         window.ShowDialog();
     }
     else if (grdTinNhanDenDS.SelectedItems.Count > 1)
     {
         LMessage.ShowMessage("M.DungChung.KhongDuocChonNhieu", LMessage.MessageBoxType.Warning);
     }
     Cursor = System.Windows.Input.Cursors.Arrow;
 }
コード例 #29
0
 /// <summary>
 /// Xử lý xóa dữ liệu
 /// </summary>
 private void Xoa()
 {
     try
     {
         DanhMucProcess danhmucProcess = new Presentation.Process.DanhMucProcess();
         if (grNhom.SelectedItems.Count > 0)
         {
             int[] arrid = new int[grNhom.SelectedItems.Count];
             List <ClientResponseDetail> listResponseDetail = new List <ClientResponseDetail>();
             for (int i = 0; i < grNhom.SelectedItems.Count; i++)
             {
                 DataRow dtr = (DataRow)grNhom.SelectedItems[i];
                 arrid[i] = int.Parse(dtr[1].ToString());
             }
             if (danhmucProcess.XoaNhom(arrid, ref listResponseDetail))
             {
                 LMessage.ShowMessage("M.DungChung.XoaThanhCong", LMessage.MessageBoxType.Information);
                 LoadTree();
             }
             else
             {
                 LMessage.ShowMessage("M.DungChung.XoaKhongThanhCong", LMessage.MessageBoxType.Error);
             }
         }
         else
         {
             LMessage.ShowMessage("M.DungChung.ChuaChonBanGhi", LMessage.MessageBoxType.Warning);
             return;
         }
     }
     catch (Exception ex)
     {
         LMessage.ShowMessage("M.DungChung.LoiXoaDuLieu", LMessage.MessageBoxType.Error);
         LLogging.WriteLog(ex.TargetSite.Name, LLogging.LogType.ERR, ex);
     }
 }
コード例 #30
0
        private bool Validation()
        {
            try
            {
                if (cmbLoaiPhuCap.SelectedIndex < 0)
                {
                    CommonFunction.ThongBaoChuaChon(lblLoaiPhuCap.Content.ToString());
                    cmbLoaiPhuCap.Focus();
                    return(false);
                }

                if (loaiPhuCap.Equals(BusinessConstant.LOAI_PHU_CAP.BO_SUNG.layGiaTri()))
                {
                    if (cmbPhuCapCho.SelectedIndex < 0)
                    {
                        CommonFunction.ThongBaoChuaChon(lblPhuCapCho.Content.ToString());
                        cmbPhuCapCho.Focus();
                        return(false);
                    }

                    string message = "";
                    if (KiemTraGridBoSung(ref message) == false)
                    {
                        LMessage.ShowMessage(message, LMessage.MessageBoxType.Warning);
                        return(false);
                    }
                }

                return(true);
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                return(false);
            }
        }