예제 #1
0
        public bool SaveSalesReturnBillSundryVoucher(eSunSpeedDomain.BillSundry_VoucherModel objBSVoucher)
        {
            string Query   = string.Empty;
            bool   isSaved = true;

            /*
             * objBSVoucher.Voucher_ID = GetSalesVoucherId();
             *
             * try
             * {
             *  DBParameterCollection paramCollection = new DBParameterCollection();
             *
             *  paramCollection.Add(new DBParameter("@SalesReturnVoucher_ID", objBSVoucher.Voucher_ID));
             *  paramCollection.Add(new DBParameter("@SalesReturnBillSundry_Name", objBSVoucher.BillSundry_Name));
             *  paramCollection.Add(new DBParameter("@SalesReturnBillSundry_Amount", objBSVoucher.BillSundry_Amount));
             *  paramCollection.Add(new DBParameter("@SalesReturnBillSundry_Qty", objBSVoucher.BillSundry_Qty));
             *  paramCollection.Add(new DBParameter("@SalesReturnBillSundry_Unit", objBSVoucher.BillSundry_Unit));
             *  paramCollection.Add(new DBParameter("@CreatedBy", "Admin"));
             *
             *  Query = "INSERT INTO SalesReturnBillSundry_Voucher([SalesReturnVoucher_ID],[SalesReturnBillSundry_Name],[SalesReturnBillSundry_Amount]," +
             *  "[SalesReturnBillSundry_Qty],[SalesReturnBillSundry_Unit],[CreatedBy]) VALUES " +
             *  "(@SalesReturnVoucher_ID,@SalesReturnBillSundry_Name,@SalesReturnBillSundry_Amount,@SalesReturnBillSundry_Qty,@SalesReturnBillSundry_Unit,@CreatedBy)";
             *
             *  if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
             *      isSaved = true;
             * }
             * catch (Exception ex)
             * {
             *  isSaved = false;
             *  throw ex;
             * }
             */
            return(isSaved);
        }
예제 #2
0
        public bool UpdateSalesBillSundryVoucher(eSunSpeedDomain.BillSundry_VoucherModel objBSVoucher)
        {
            string Query    = string.Empty;
            bool   isUpdate = true;

            /*
             * try
             * {
             *  DBParameterCollection paramCollection = new DBParameterCollection();
             *
             *  paramCollection.Add(new DBParameter("@SalesBillSundry_Name", objBSVoucher.BillSundry_Name));
             *  paramCollection.Add(new DBParameter("@SalesBillSundry_Amount", objBSVoucher.BillSundry_Amount));
             *  paramCollection.Add(new DBParameter("@SalesBillSundry_Qty", objBSVoucher.BillSundry_Qty));
             *  paramCollection.Add(new DBParameter("@SalesBillSundry_Unit", objBSVoucher.BillSundry_Unit));
             *  paramCollection.Add(new DBParameter("@ModifiedBy", "Admin"));
             *  paramCollection.Add(new DBParameter("@ModifiedDate", DateTime.Now));
             *
             *  paramCollection.Add(new DBParameter("@SalesBillSundry_ID", objBSVoucher.BillSundry_ID));
             *  paramCollection.Add(new DBParameter("@SalesVoucher_ID", objBSVoucher.Voucher_ID));
             *
             *  Query = "UPDATE SalesBillSundry_Voucher SET [SalesBillSundry_Name]=@SalesBillSundry_Name,[SalesBillSundry_Amount]=@SalesBillSundry_Amount," +
             *  "[SalesBillSundry_Qty]=@SalesBillSundry_Qty,[SalesBillSundry_Unit]=@SalesBillSundry_Unit,[ModifiedBy]=@ModifiedBy,[ModifiedDate]=@ModifiedDate " +
             *  "WHERE [SalesBillSundry_ID]=@SalesBillSundry_ID AND [SalesVoucher_ID]=@SalesVoucher_ID";
             *
             *  if (_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0)
             *      isUpdate = true;
             * }
             * catch (Exception ex)
             * {
             *  isUpdate = false;
             *  throw ex;
             * }
             */
            return(isUpdate);
        }