public int Delete(TC_OA_PurchasePriceModel ObjModel) { int num = 0; using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(); try { try { num = new TC_OA_PurchasePriceBLL().Delete(ObjModel.Code, transaction); transaction.Commit(); } catch (SqlException exception) { transaction.Rollback(); connection.Close(); throw exception; } return(num); } finally { connection.Close(); } } return(num); }
public int ModifyPassAuditing(int Code, SqlTransaction Transaction) { TC_OA_PurchasePriceModel objModel = this.GetModel(Code, Transaction); objModel.Auditing = 3; return(this.Update(objModel, Transaction)); }
public TC_OA_PurchasePriceModel GetTC_OA_PurchasePrice(int Code) { TC_OA_PurchasePriceModel model = new TC_OA_PurchasePriceModel(); using (SqlConnection connection = new SqlConnection(FunctionRule.GetConnectionString())) { try { connection.Open(); model = new TC_OA_PurchasePriceBLL().GetModel(Code, connection); connection.Close(); } catch (SqlException exception) { throw exception; } } return(model); }
public int Update(TC_OA_PurchasePriceModel ObjModel, SqlTransaction Transaction) { TC_OA_PurchasePriceDAL edal = new TC_OA_PurchasePriceDAL(Transaction); return(edal.Update(ObjModel)); }