HBM.GeneralManagement.GauranteeDAO.Update C# (CSharp) Метод

Update() публичный Метод

public Update ( Gaurantee gaurantee ) : bool
gaurantee Gaurantee
Результат bool
        public bool Update(Gaurantee gaurantee)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_GuaranteeUpdate");

            db.AddInParameter(command, "@GuaranteeId", DbType.Int32, gaurantee.GuaranteeId);
            db.AddInParameter(command, "@CompanyId", DbType.Int32, gaurantee.CompanyId);
            db.AddInParameter(command, "@GuaranteeName", DbType.String, gaurantee.GuaranteeName);
            db.AddInParameter(command, "@GuaranteeDescription", DbType.String, gaurantee.GuaranteeDescription);
            db.AddInParameter(command, "@UpdatedBy", DbType.Int32, gaurantee.UpdatedBy);
            db.AddInParameter(command, "@UpdatedDate", DbType.DateTime, gaurantee.UpdatedDate);

            db.ExecuteNonQuery(command);

            return true;
        }