Example #1
0
 /// <summary>
 /// 添加薪酬级别
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddSys_PayGrade(Sys_PayGrade model)
 {
     using (IDbConnection connection = OpenConnection())
     {
         const string strSql =
             @"insert into Sys_PayGrade(GradeName) values(@GradeName)
         SELECT @@Identity AS ID";
         var param = new
         {
             GradeName = model.GradeName
         };
         decimal id =
             connection.Query <decimal>(strSql, param)
             .FirstOrDefault();
         model.Id = decimal.ToInt32(id);
     }
     return(model.Id);
 }
Example #2
0
 /// <summary>
 /// 添加薪酬级别
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int AddSys_PayGrade(Sys_PayGrade model)
 {
     return(payGradeDB.AddSys_PayGrade(model));
 }