Exemple #1
0
        private void btnTransfer_Click(object sender, EventArgs e)
        {
            if (PaymentTableItem.ID <= 0)
            {
                return;
            }

            foreach (int i in grvData.GetSelectedRows())
            {
                int       voucherID = TextUtils.ToInt(grvData.GetRowCellValue(i, colID));
                DataRow[] drs       = _dtDebt.Select("PayVoucherID = " + voucherID);
                if (drs.Length > 0)
                {
                    continue;
                }
                PayVoucherDebtModel model = new PayVoucherDebtModel();
                model.PayVoucherID       = voucherID;
                model.PaymentTableItemID = PaymentTableItem.ID;
                model.CreatedBy          = Global.AppUserName;
                model.CreatedDate        = TextUtils.GetSystemDate();
                PayVoucherDebtBO.Instance.Insert(model);
            }

            loadDebt();
        }
Exemple #2
0
        private void btnDeleteDebt_Click(object sender, EventArgs e)
        {
            if (grvDebt.SelectedRowsCount == 0)
            {
                return;
            }

            foreach (int i in grvDebt.GetSelectedRows())
            {
                long id = TextUtils.ToInt64(grvDebt.GetRowCellValue(i, colDebtID));
                PayVoucherDebtModel model = (PayVoucherDebtModel)PayVoucherDebtBO.Instance.FindByPK(id);
                model.CompletedDate = TextUtils.GetSystemDate();
                PayVoucherDebtBO.Instance.Update(model);
            }
            loadDebt();
        }
Exemple #3
0
 private void btnSaveDateDK_Click(object sender, EventArgs e)
 {
     grvDebt.FocusedRowHandle = -1;
     for (int i = 0; i < grvDebt.RowCount; i++)
     {
         try
         {
             long id = TextUtils.ToInt64(grvDebt.GetRowCellValue(i, colDebtID));
             PayVoucherDebtModel model = (PayVoucherDebtModel)PayVoucherDebtBO.Instance.FindByPK(id);
             model.CompletedDateDK = TextUtils.ToDate(grvDebt.GetFocusedRowCellValue(colDebtCompletedDateDK).ToString());
             PayVoucherDebtBO.Instance.Update(model);
         }
         catch (Exception)
         {
         }
     }
     MessageBox.Show("Lưu trữ ngày trả dự kiến thànhg công!", TextUtils.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
 }
Exemple #4
0
 protected PayVoucherDebtFacade(PayVoucherDebtModel model) : base(model)
 {
 }