예제 #1
0
 /// <summary>
 /// 更改成绩类别的权重
 /// </summary>
 /// <param name="weightID"></param>
 /// <returns></returns>
 public static bool ScoreWeightDetail_Upd(ScoreWeight sw)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@WeightID", sw.WeightID);
             p.Add("@OCID", sw.OCID);
             p.Add("@ScoreTypeID", sw.ScoreTypeID);
             p.Add("@JoinNum", sw.JoinNum);
             p.Add("@Power", sw.Power);
             conn.Execute("ScoreWeightDetail_Upd", p, commandType: CommandType.StoredProcedure);
             return true;
         }
     }
     catch (Exception)
     {
         return false;
     }
 }
예제 #2
0
 /// <summary>
 /// 成绩权重类别列表
 /// </summary>
 /// <param name="teachingClassID"></param>
 /// <returns></returns>
 public static ScoreWeight ScoreWeight_Add(ScoreWeight model)
 {
     try
     {
         using (var conn = DbHelper.CCService())
         {
             var p = new DynamicParameters();
             p.Add("@WeightID", dbType: DbType.Int32, direction: ParameterDirection.Output);
             p.Add("@OCID", model.OCID);
             p.Add("@UserID", model.UserID);
             p.Add("@UserName", model.UserName);
             p.Add("@OCClassID", model.OCClassID);
             conn.Execute("ScoreWeight_Add", p, commandType: CommandType.StoredProcedure);
             model.WeightID = p.Get<int>("WeightID");
             return model;
         }
     }
     catch (Exception)
     {
         return null;
     }
 }
예제 #3
0
 public ScoreWeight ScoreWeight_Add(ScoreWeight sw)
 {
     return ScoreWeightDAL.ScoreWeight_Add(sw);
 }
예제 #4
0
 /// <summary>
 /// 更改成绩类别的权重
 /// </summary>
 /// <param name="weightID"></param>
 /// <returns></returns>
 public bool ScoreWeightDetail_Upd(ScoreWeight sw)
 {
     return ScoreWeightDAL.ScoreWeightDetail_Upd(sw);
 }