コード例 #1
0
        private void uc_Thanh_Toan_Load(object sender, EventArgs e)
        {
            try
            {
                customer Customer        = DAL_QLCustomer.Get_Customer(idCustomer);
                int      tien_vay        = Customer.Money;
                double   tien_goc_con_no = DAL_QLCustomer.Get_After_Money(idCustomer);
                double   tien_goc_da_tra = tien_vay - tien_goc_con_no;
                double   tien_lai        = DAL_LichSuTraTien.Get_Tien_Lai(idCustomer);

                _tien_goc_con_no = tien_goc_con_no;
                _tien_lai        = tien_lai;

                lbl_fullname.Text        = Customer.FullName.ToString();
                lbl_cmnd.Text            = Customer.IdCard.ToString();
                lbl_tien_goc.Text        = Util.formatMoney(Convert.ToInt32(tien_vay));
                lbl_tien_goc_da_tra.Text = Util.formatMoney(Convert.ToInt32(tien_goc_da_tra));
                lbl_tien_goc_con_no.Text = Util.formatMoney(Convert.ToInt32(tien_goc_con_no));
                lbl_tien_lai.Text        = Util.formatMoney(Convert.ToInt32(tien_lai));
            }
            catch (Exception)
            {
                throw;
            }
        }
コード例 #2
0
 private void Load_Data()
 {
     try
     {
         txt_total_customer.Text         = Util.formatMoney(DAL_Thongke.Get_Total_Customer());
         txt_total_money.Text            = Util.formatMoney(Convert.ToInt32(DAL_Thongke.Get_Total_Money()));
         txt_tien_thu.Text               = Util.formatMoney(Convert.ToInt32(DAL_Thongke.Get_Total_Money_Paid("0") + DAL_Thongke.Get_Total_Money_Paid("1")));
         grcDanhSachKhachHang.DataSource = Util.ConvertToDataTable(DAL_QLCustomer.Get_List_Customer(Variable.orderByCreatedAt));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
        public void uc_Detail_Customer_Load(object sender, EventArgs e)
        {
            if (Data_Customer.ToString() != "")
            {
                List <category> lst_category = new List <category>();

                lst_category = DAL_QLCategory.Get_List_Category("category");

                ImageComboBoxItem item;
                foreach (var data in lst_category)
                {
                    item = new ImageComboBoxItem(data.Name, data.id, data.id);
                    cbb_category.Properties.Items.Add(item);
                }
                _ID_CUSTOMER              = Util.Cnv_Int(Data_Customer["id"].ToString().Trim());
                txt_edit_fullname.Text    = Data_Customer["FullName"].ToString().Trim();
                txt_edit_note.Text        = Data_Customer["Note"].ToString().Trim();
                txt_edit_familyphone.Text = Data_Customer["FamilyPhone"].ToString().Trim();
                txt_edit_idcard.Text      = Data_Customer["IdCard"].ToString().Trim();
                txt_money.Text            = Util.formatMoney(Convert.ToInt32(Data_Customer["Money"].ToString().Trim()));
                txt_cycle.Value           = Convert.ToInt32(Data_Customer["Cycle"].ToString().Trim());
                txt_edit_phone.Text       = Data_Customer["PhoneNumber"].ToString().Trim();
                radio_edit_sex.EditValue  = (bool)Data_Customer["Sex"];
                txt_edit_address.Text     = Data_Customer["Address"].ToString().Trim();
                cbb_category.EditValue    = int.Parse(Data_Customer["IdCategory"].ToString());
                birthDay_customer.Text    = (DateTime.Parse(Data_Customer["BirthDay"].ToString().Trim())).ToString(Variable.format_date);
                date_paid.Text            = (DateTime.Parse(Data_Customer["CreatedAt"].ToString().Trim())).ToString(Variable.format_date);
            }
        }
コード例 #4
0
 private void Load_Data()
 {
     try
     {
         int no = 0;
         var lst_customer_no = DAL_QLCustomer.Get_List_Customer(Variable.orderByAfterDate);
         foreach (var item in lst_customer_no)
         {
             no += Convert.ToInt32(DAL_LichSuTraTien.Get_Tien_Lai(item.id));
         }
         txt_money_day.Text      = Util.formatMoney(no);
         txt_tien_thu_day.Text   = Util.formatMoney(Convert.ToInt32(DAL_Thongke.Get_Money_Thu_Day()));
         grcKhachHang.DataSource = Util.ConvertToDataTable(DAL_QLCustomer.Get_List_Customer(Variable.orderByAfterDate));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }