예제 #1
0
 public Boolean edit(SellBillModel billItem)
 {
     if (billItem == null)
     {
         billItem = new SellBillModel();
     }
     try
     {
         string sqlString = "Update tblSellBill Set Product_Id = '" + billItem.productId
                            + "', SellBill_Date = '" + billItem.date
                            + "', SellBill_Date = '" + billItem.customerId
                            + "', Employ_Id = '" + billItem.employId
                            + "', SellBill_Amount = '" + billItem.billAmount
                            + "', SellBill_Price = '" + billItem.billPrice
                            + "', SellBill_Status = '" + billItem.billStatus
                            + "', SellBill_Notice = '" + billItem.billNotice
                            + "', SellBill_Unit = '" + billItem.billUnit
                            + "' Where SellBill_Id = '" + billItem.billId + "')";
         sqlConnection.Open();
         SqlCommand sqlCommand = new SqlCommand(sqlString, sqlConnection);
         sqlCommand.ExecuteNonQuery();
         sqlConnection.Close();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #2
0
        public Boolean add(SellBillModel billItem)
        {
            try
            {
                if (billItem == null)
                {
                    billItem = new SellBillModel();
                }
                string sqlString = "Insert into tblSellBill Values('" + billItem.billId + "','"
                                   + billItem.productId + "','"
                                   + billItem.date + "','"
                                   + billItem.customerId + "','"
                                   + billItem.employId + "','"
                                   + billItem.billAmount + "','"
                                   + billItem.billPrice + "','"
                                   + billItem.billStatus + "','"
                                   + billItem.billNotice + "','"
                                   + billItem.billUnit + "')";

                sqlConnection.Open();

                SqlCommand sqlCommand = new SqlCommand(sqlString, sqlConnection);
                sqlCommand.ExecuteNonQuery();
                sqlConnection.Close();
                return(true);
            }
            catch
            {
                return(false);
            }
        }
예제 #3
0
 public Boolean edit(SellBillModel sellBillModel)
 {
     return(dalSellBill.edit(sellBillModel));
 }
예제 #4
0
 public Boolean add(SellBillModel sellBillModel)
 {
     return(dalSellBill.add(sellBillModel));
 }