Esempio n. 1
0
 public static bool AddCash(ListView lstvCart, string userID, string payment, string bill)
 {
     try
     {
         if (string.IsNullOrWhiteSpace(payment))
         {
             MessageBox.Show("Enter your Payment.", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return(false);
         }
         if (Convert.ToDouble(bill) > Convert.ToDouble(payment))
         {
             MessageBox.Show("Insufficient Cash!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return(false);
         }
         SaleRecordDAL saleRecordDAL = new SaleRecordDAL();
         saleRecordDAL.AddCash(lstvCart.Items, userID);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return(false);
     }
     return(true);
 }
Esempio n. 2
0
        public List <tblRecord> Search(string Description)
        {
            SaleRecordDAL SaleRecord = new SaleRecordDAL();

            return(SaleRecord.search(Description));
        }
Esempio n. 3
0
        public List <tblRecord> GetAllCash()
        {
            SaleRecordDAL salerecord = new SaleRecordDAL();

            return(salerecord.getAllCash());
        }
Esempio n. 4
0
        public List <tblRecord> DeleteAllCash()
        {
            SaleRecordDAL saleRecord = new SaleRecordDAL();

            return(saleRecord.DeleteAllCash());
        }