コード例 #1
0
 public string AddInvoice(string InvoiceNo, string InvoiceDate, string InvoiceAmount, string Vat, string StockQty, string RecievedDate, string PartyName, string CashDiscount, string FrieghtChgs, string TotalInvoiceAmount, string Remarks)
 {
     GetStoreId();
     try
     {
         if (!string.IsNullOrEmpty(InvoiceAmount) && !string.IsNullOrEmpty(InvoiceDate) && !string.IsNullOrEmpty(InvoiceNo) &&
             !string.IsNullOrEmpty(Vat) && !string.IsNullOrEmpty(StockQty) && !string.IsNullOrEmpty(RecievedDate) &&
             !string.IsNullOrEmpty(PartyName) && !string.IsNullOrEmpty(CashDiscount) && !string.IsNullOrEmpty(FrieghtChgs) &&
             !string.IsNullOrEmpty(TotalInvoiceAmount))
         {
             if (0 < objDal.AddInvoice(InvoiceNo, InvoiceDate, InvoiceAmount, Vat, StockQty, RecievedDate, PartyName, CashDiscount, FrieghtChgs, TotalInvoiceAmount, StoreId, Remarks))
             {
                 return("Thank you " + User.Identity.Name + ". Invoice Added.");
             }
             else
             {
                 return("Error Occured");
             }
         }
         else
         {
             return("Please complete the form.");
         }
     }
     catch (Exception ex)
     {
         return("Error Occurred !!  " + ex.Message);
     }
 }