Beispiel #1
0
        public DataTable GetParameters()
        {
            if (!Validation())
            {
                return(null);
            }

            GetFormData();

            DataTable dt = null;

            LDatatable.MakeParameterListTable(ref dt);
            LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
            LDatatable.AddParameterList(ref dt, "MA_DVI_QLY", ClientInformation.MaDonVi);
            LDatatable.AddParameterList(ref dt, "MA_DVI_TAO", ClientInformation.MaDonViGiaoDich);
            LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);
            LDatatable.AddParameterList(ref dt, "NGAY_GDICH", Convert.ToDateTime(raddtNgayGiaoDich.Value).ToString("yyyyMMdd"));

            foreach (DataRowView drv in grid.Items)
            {
                LDatatable.AddParameterList(ref dt,
                                            "DETAIL",
                                            drv["MA_KHE_UOC"].ToString(),
                                            drv["THUC_THU_GOC_VAY_CU"].ToString(),
                                            drv["THUC_THU_GOC_VAY"].ToString(),
                                            drv["THUC_THU_LAI_TRONG_CU"].ToString(),
                                            drv["THUC_THU_LAI_TRONG"].ToString()
                                            );
            }

            return(dt);
        }
Beispiel #2
0
        public DataTable GetParameters()
        {
            if (!Validation())
            {
                return(null);
            }

            GetFormData();

            DataTable dt = null;

            LDatatable.MakeParameterListTable(ref dt);
            LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
            LDatatable.AddParameterList(ref dt, "MA_DVI_QLY", ClientInformation.MaDonVi);
            LDatatable.AddParameterList(ref dt, "MA_DVI_TAO", ClientInformation.MaDonViGiaoDich);
            LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);
            LDatatable.AddParameterList(ref dt, "NGAY_GDICH", Convert.ToDateTime(raddtNgayGiaoDich.Value).ToString("yyyyMMdd"));

            foreach (DataRowView drv in grGuiThemDS.Items)
            {
                LDatatable.AddParameterList(ref dt,
                                            "DETAIL",
                                            drv["SO_SO_TG"].ToString(),
                                            drv["SO_TIEN_GUI_THEM_CU"].ToString(),
                                            drv["SO_TIEN_GUI_THEM"].ToString(),
                                            drv["SO_DU_MOI"].ToString()
                                            );
            }

            return(dt);
        }
        public DataTable GetParameters()
        {
            if (!Validation())
            {
                return(null);
            }

            GetFormData();

            DataTable dt = null;

            LDatatable.MakeParameterListTable(ref dt);
            LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
            LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);
            LDatatable.AddParameterList(ref dt, "NGAY_GDICH", Convert.ToDateTime(raddtNgayGiaoDich.Value).ToString("yyyyMMdd"));

            foreach (DataRowView drv in raddgrHachToan.Items)
            {
                LDatatable.AddParameterList(ref dt,
                                            "PHAT_SINH_CT",
                                            drv["ID"].ToString(),
                                            drv["ID_PLOAI"].ToString(),
                                            drv["MA_PLOAI"].ToString(),
                                            drv["SO_TAI_KHOAN"].ToString(),
                                            drv["GHI_NO"].ToString(),
                                            drv["GHI_CO"].ToString()
                                            );
            }

            return(dt);
        }
Beispiel #4
0
        private void LayDuLieu()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                if (txtMaGiaoDich.Text.IsNullOrEmptyOrSpace())
                {
                    return;
                }

                DataTable dt = null;
                LDatatable.MakeParameterListTable(ref dt);
                LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
                LDatatable.AddParameterList(ref dt, "MA_DVI_QLY", ClientInformation.MaDonVi);
                LDatatable.AddParameterList(ref dt, "MA_DVI_TAO", ClientInformation.MaDonViGiaoDich);
                LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);

                DataSet ds = new HoTroProcess().LayDuLieu(dataQueryGet, dt);

                if (KiemTraDuLieuTraVe(ds) == 0)
                {
                    ClearForm();
                    return;
                }

                if (ds != null && ds.Tables.Count > 1)
                {
                    txtSoSoTG.Text           = ds.Tables[1].Rows[0]["SO_SO_TG"].ToString();
                    raddtNgayGiaoDich.Value  = LDateTime.StringToDate(ds.Tables[1].Rows[0]["NGAY_GDICH"].ToString(), "yyyyMMdd");
                    raddtNgayChuyenDen.Value = LDateTime.StringToDate(ds.Tables[1].Rows[0]["NGAY_GDICH"].ToString(), "yyyyMMdd");
                    txtDienGiai.Text         = ds.Tables[1].Rows[0]["DIEN_GIAI"].ToString();
                    txtMaKhachHang.Text      = ds.Tables[1].Rows[0]["MA_KHANG"].ToString();
                    txtTenKhachHang.Text     = ds.Tables[1].Rows[0]["TEN_KHANG"].ToString();
                    numSoDu.Value            = Convert.ToDouble(ds.Tables[1].Rows[0]["SO_DU"]);
                    numSoTienGuiThem.Value   = Convert.ToDouble(ds.Tables[1].Rows[0]["SO_TIEN_GUI_THEM"]);
                }
                else
                {
                    ClearForm();
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                CommonFunction.ThongBaoLoi(ex);
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
            }
        }
        private void LayDuLieu()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                if (txtMaGiaoDich.Text.IsNullOrEmptyOrSpace())
                {
                    return;
                }

                DataTable dt = null;
                LDatatable.MakeParameterListTable(ref dt);
                LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
                LDatatable.AddParameterList(ref dt, "MA_DVI_QLY", ClientInformation.MaDonVi);
                LDatatable.AddParameterList(ref dt, "MA_DVI_TAO", ClientInformation.MaDonViGiaoDich);
                LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);

                DataSet ds = new HoTroProcess().LayDuLieu(dataQueryGet, dt);

                if (KiemTraDuLieuTraVe(ds) == 0)
                {
                    ClearForm();
                    return;
                }

                if (ds != null && ds.Tables.Count > 2)
                {
                    raddtNgayGiaoDich.Value = LDateTime.StringToDate(ds.Tables[1].Rows[0]["NGAY_GDICH"].ToString(), "yyyyMMdd");
                    txtDienGiai.Text        = ds.Tables[1].Rows[0]["DIEN_GIAI"].ToString();

                    grDuChiDS.ItemsSource = ds.Tables[2].DefaultView;
                }
                else
                {
                    ClearForm();
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                CommonFunction.ThongBaoLoi(ex);
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
            }
        }
Beispiel #6
0
        public DataTable GetParameters()
        {
            if (!Validation())
            {
                return(null);
            }

            GetFormData();

            DataTable dt = null;

            LDatatable.MakeParameterListTable(ref dt);
            LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
            LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);
            LDatatable.AddParameterList(ref dt, "NGAY_GDICH", Convert.ToDateTime(raddtNgayGiaoDich.Value).ToString("yyyyMMdd"));

            return(dt);
        }
        private void LayDuLieu()
        {
            Mouse.OverrideCursor = Cursors.Wait;
            try
            {
                if (txtMaGiaoDich.Text.IsNullOrEmptyOrSpace())
                {
                    return;
                }

                DataTable dt = null;
                LDatatable.MakeParameterListTable(ref dt);
                LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
                LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);

                DataSet ds = new HoTroProcess().LayDuLieu(dataQueryGet, dt);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    raddtNgayGiaoDich.Value = LDateTime.StringToDate(ds.Tables[0].Rows[0]["NGAY_GDICH"].ToString(), "yyyyMMdd");
                    txtDienGiai.Text        = ds.Tables[0].Rows[0]["DIEN_GIAI"].ToString();
                    string maDonVi    = ds.Tables[0].Rows[0]["MA_DVI"].ToString();
                    string maNguonVon = ds.Tables[0].Rows[0]["NV_LOAI_NVON"].ToString();

                    LoadComboBoxNguonVon(maDonVi);

                    cmbNguonVon.SelectedIndex = lstSourceNguonVon.IndexOf(lstSourceNguonVon.FirstOrDefault(i => i.KeywordStrings.First().Equals(maNguonVon)));

                    raddgrHachToan.ItemsSource = ds.Tables[0].DefaultView;
                }
                else
                {
                    raddgrHachToan.ItemsSource = null;
                }
            }
            catch (Exception ex)
            {
                LLogging.WriteLog(System.Reflection.MethodInfo.GetCurrentMethod().ToString(), LLogging.LogType.ERR, ex);
                CommonFunction.ThongBaoLoi(ex);
            }
            finally
            {
                Mouse.OverrideCursor = Cursors.Arrow;
            }
        }
        public DataTable GetParameters()
        {
            if (!Validation())
            {
                return(null);
            }

            GetFormData();

            DataTable dt = null;

            LDatatable.MakeParameterListTable(ref dt);
            LDatatable.AddParameterList(ref dt, "MA_NSD", ClientInformation.TenDangNhap);
            LDatatable.AddParameterList(ref dt, "MA_DVI_QLY", ClientInformation.MaDonVi);
            LDatatable.AddParameterList(ref dt, "MA_DVI_TAO", ClientInformation.MaDonViGiaoDich);
            LDatatable.AddParameterList(ref dt, "MA_GDICH", txtMaGiaoDich.Text);
            LDatatable.AddParameterList(ref dt, "NGAY_GDICH", Convert.ToDateTime(raddtNgayGiaoDich.Value).ToString("yyyyMMdd"));
            LDatatable.AddParameterList(ref dt, "SO_TIEN_GUI_THEM", numSoTienGuiThem.Value.ToString());

            return(dt);
        }