/// <summary> /// ��ʾ��ʱ���� /// </summary> /// <returns></returns> public static DataSet SelectALL() { DataBase db = new DataBase(); DataBaseVisitor visitor = new WSV.DAL.Weight.PlanDAL(); DataSet ds = new DataSet(); try { ds = db.ReturnDataSet(visitor, "SelectALL", "V_DC_Plan"); } catch (Exception ex) { throw new Exception(ex.Message); } finally { db.Dispose(); } return ds; }
public static void upSpare(string Type, string Plan_Code, decimal Spare) { DataBase db = new DataBase(); DataBaseVisitor visitor = new WSV.DAL.Weight.PlanDAL(); SqlParameter[] prams = new SqlParameter[2]; if (Type == "01") { prams[0] = db.MakeInParam("@Plan_Code", SqlDbType.VarChar, 50, Plan_Code); prams[1] = db.MakeInParam("@Plan_SpareNum", SqlDbType.Decimal, 50, Spare); try { db.TransactSql(visitor, "Plan_SpareNum", prams); } catch (Exception e) { db.Dispose(); return; } } if (Type == "02") { prams[0] = db.MakeInParam("@Plan_Code", SqlDbType.VarChar, 50, Plan_Code); prams[1] = db.MakeInParam("@Plan_SpareMoney", SqlDbType.Decimal, 50, Spare); try { db.TransactSql(visitor, "Plan_SpareMoney", prams); } catch (Exception e) { db.Dispose(); return; } } }