public int AddCustomerReceipt(DateTime receiptDate, double sum, int payBy, string chequaNum, int bank, int paymentNum, string runch, string bankAccount, string cardsKind, string CreditCard, string validity, string Name, int ReceiptNum, string Id) { DAAddReceipt dm = new DAAddReceipt(); ListDictionary Params = new ListDictionary(); Params.Add("@ReceiptDate", BLCtrl.sendDateTime(receiptDate, new DateTime())); Params.Add("@Sum", BLCtrl.sendDouble(sum, 0)); if (payBy != 0) { Params.Add("@PayBy", payBy); } else { Params.Add("@PayBy", DBNull.Value); } Params.Add("@chequaNum", BLCtrl.sendString(chequaNum, "")); if (bank != 0) { Params.Add("@Bank", bank); } else { Params.Add("@Bank", DBNull.Value); } Params.Add("@Brunch", BLCtrl.sendString(runch, "")); Params.Add("@BankAccount", BLCtrl.sendString(bankAccount, "")); Params.Add("@CardsKind", BLCtrl.sendString(cardsKind, "")); Params.Add("@CreditCard", BLCtrl.sendString(CreditCard, "")); Params.Add("@Validity", BLCtrl.sendString(validity, "")); Params.Add("@Name", BLCtrl.sendString(Name, "")); Params.Add("@paymentNum", BLCtrl.sendInt(paymentNum, 0)); Params.Add("@ReceiptNum", BLCtrl.sendInt(ReceiptNum, 0)); Params.Add("@Id", BLCtrl.sendString(Id, "")); int result = dm.addReceipt(Params, "addCustomerReceipt"); return(result); }