public void chequeUpdate(cheque cheque) { createConnection(); connection.Open(); SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "chequeUpdate"; command.Parameters.Add("@chequeCode", SqlDbType.Int, 50); command.Parameters["@chequeCode"].Value = cheque.code; command.Parameters.Add("@alınanVerilen", SqlDbType.NVarChar, 50); command.Parameters["@alınanVerilen"].Value = cheque.alınanVerilen; command.Parameters.Add("@takeDate", SqlDbType.Date, 50); command.Parameters["@takeDate"].Value = cheque.TakeDate; command.Parameters.Add("@returnDate", SqlDbType.Date, 50); command.Parameters["@returnDate"].Value = cheque.returnDate; command.Parameters.Add("@moneyy", SqlDbType.Money, 50); command.Parameters["@moneyy"].Value = cheque.money; command.Parameters.Add("@bankName", SqlDbType.NVarChar, 50); command.Parameters["@bankName"].Value = cheque.bankName; command.Parameters.Add("@companyCustomer", SqlDbType.Int, 50); command.Parameters["@companyCustomer"].Value = cheque.companyCustomer; command.Parameters.Add("@ownerr", SqlDbType.NVarChar, 50); command.Parameters["@ownerr"].Value = cheque.ownerr; command.ExecuteNonQuery(); connection.Close(); }
public void chequeAdd(cheque cheque) { createConnection(); connection.Open(); SqlCommand command = new SqlCommand(); command.Connection = connection; command.CommandType = CommandType.StoredProcedure; command.CommandText = "chequeAdd"; command.Parameters.Add("@alınanVerilen", SqlDbType.NVarChar, 50); command.Parameters["@alınanVerilen"].Value = cheque.alınanVerilen; command.Parameters.Add("@takeDate", SqlDbType.Date, 50); command.Parameters["@takeDate"].Value = cheque.TakeDate; command.Parameters.Add("@returnDate", SqlDbType.Date, 50); command.Parameters["@returnDate"].Value = cheque.returnDate; command.Parameters.Add("@moneyy", SqlDbType.Money, 50); command.Parameters["@moneyy"].Value = cheque.money; command.Parameters.Add("@bankName", SqlDbType.NVarChar, 50); command.Parameters["@bankName"].Value = cheque.bankName; command.Parameters.Add("@companyCustomer", SqlDbType.Int, 50); command.Parameters["@companyCustomer"].Value = cheque.companyCustomer; command.Parameters.Add("@ownerr", SqlDbType.NVarChar, 50); command.Parameters["@ownerr"].Value = cheque.ownerr; command.ExecuteNonQuery(); connection.Close(); }