Exemple #1
0
        private void tsmiPayEdit_Click(object sender, EventArgs e)
        {
            if (dgvAllPay.Rows.Count > 0)
            {
                Int16 PayID = Convert.ToInt16(dgvAllPay.CurrentRow.Cells[0].Value);

                TransactionActivity.TransactionLog TL = new TransactionActivity.TransactionLog();
                DataTable dtDFPP = TL.Select(PayID);///// DFPP= Delete From Person Pay

                if (dtDFPP != null)
                {
                    frmPay fp = new frmPay();

                    if (dtDFPP.Rows[0]["payMethod"].ToString() == "doc")
                    {
                        //frmCheck FC = new frmCheck();
                        //FC.PersonalId = Convert.ToInt16(CurrentPesonalID);
                        //FC.ShowDialog(this);
                        fp.Payis = "cheque";
                    }
                    else if (dtDFPP.Rows[0]["payMethod"].ToString() == "cash")
                    {
                        fp.Payis = "cash";
                    }

                    fp.CurrentPesonalID = Convert.ToDecimal(CurrentPesonalID);
                    fp.mode             = "edit";
                    fp.PayId            = Convert.ToDecimal(dgvAllPay.CurrentRow.Cells[0].Value);
                    fp.Text             = "اصلاح پرداختی";
                    fp.ShowDialog(this);
                }
            }
        }
Exemple #2
0
 private void tsmiOldRemainaccountDelete_Click(object sender, EventArgs e)
 {
     if (dgvReaminAccountList.Rows.Count > 0)
     {
         TransactionActivity.TransactionLog TL = new TransactionActivity.TransactionLog();
         DataTable dtRemainAccount             = TL.Select(Convert.ToDecimal(dgvReaminAccountList.CurrentRow.Cells[0].Value));
         if (dtRemainAccount.Rows.Count == 1)
         {
             string QMessage = "مانده حساب با مبلغ" + GS.nf(dtRemainAccount.Rows[0]["payPrice"].ToString()) + " و با شرح ( " + dtRemainAccount.Rows[0]["payAbout"].ToString() + " ) حذف شود؟";
             if (GS.dialog.Question("حذف مانده حساب", QMessage) == DialogResult.OK)
             {
                 decimal TLId = Convert.ToDecimal(dtRemainAccount.Rows[0]["id"].ToString());
                 TL.delete(TLId);
                 SelectPersonal();
             }
         }
     }
 }