public Boolean edit(ReceiveBillModel billItem) { if (billItem == null) { billItem = new ReceiveBillModel(); } try { string sqlString = "Update tblReceiveBill Set Product_Id = '" + billItem.productId + "', ReceiveBill_Date = '" + billItem.date + "', ReceiveBill_Date = '" + billItem.contributorId + "', Employ_Id = '" + billItem.employId + "', ReceiveBill_Amount = '" + billItem.billAmount + "', ReceiveBill_Price = '" + billItem.billPrice + "', ReceiveBill_Status = '" + billItem.billStatus + "', ReceiveBill_Notice = '" + billItem.billNotice + "', ReceiveBill_Unit = '" + billItem.billUnit + "', ReceiveBill_Unit = '" + billItem.billUnit + "' Where ReceiveBill_Id = '" + billItem.billId + "')"; sqlConnection.Open(); SqlCommand sqlCommand = new SqlCommand(sqlString, sqlConnection); sqlCommand.ExecuteNonQuery(); sqlConnection.Close(); return(true); } catch { return(false); } }
public Boolean add(ReceiveBillModel billItem) { try { if (billItem == null) { billItem = new ReceiveBillModel(); } string sqlString = "Insert into tblReceiveBill Values('" + billItem.billId + "','" + billItem.productId + "','" + billItem.date + "','" + billItem.contributorId + "','" + 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); } }
public Boolean delete(ReceiveBillModel billItem) { if (billItem == null) { billItem = new ReceiveBillModel(); } try { string sqlString = "Delete tblReceiveBill where ReceiveBill_Id='" + billItem.billId + "'"; sqlConnection.Open(); SqlCommand sqlCommand = new SqlCommand(sqlString, sqlConnection); sqlCommand.ExecuteNonQuery(); sqlConnection.Close(); return(true); } catch { return(false); } }
public Boolean delete(ReceiveBillModel receiveBill) { return(dalReceiveBill.delete(receiveBill)); }
public Boolean edit(ReceiveBillModel receiveBill) { return(dalReceiveBill.edit(receiveBill)); }
public Boolean add(ReceiveBillModel receiveBill) { return(dalReceiveBill.add(receiveBill)); }