Example #1
0
        /// <summary>
        /// 修改特别签录
        /// </summary>
        /// <param name="entry"></param>
        /// <returns></returns>
        public int UpdateSpecialSignTheRecord(SpecialSignTheRecord special)
        {
            using (MySqlConnection conn = DapperHelper.GetConnString())
            {
                DynamicParameters parameters = new DynamicParameters();
                parameters.Add("@StaffId", special.StaffId, null, null, null);
                parameters.Add("@Name", special.Name, null, null, null);
                parameters.Add("@Department", special.Department, null, null, null);
                parameters.Add("@AttendanceDate", special.AttendanceDate, null, null, null);
                parameters.Add("@AttendanceTypes", special.AttendanceTypes, null, null, null);
                parameters.Add("@SignInDate", special.SignInDate, null, null, null);
                parameters.Add("@SignOutDate", special.SignOutDate, null, null, null);
                parameters.Add("@AlterSignInDate", special.AlterSignInDate, null, null, null);
                parameters.Add("@Id", special.Id, null, null, null);

                string sql = "UPDATE specialsigntherecord set StaffId=@StaffId,Name=@Name,Department=@Department,AttendanceDate=@AttendanceDate,AttendanceTypes=@AttendanceTypes,SignInDate=@SignInDate,SignOutDate=@SignOutDate,AlterSignInDate=@AlterSignInDate where Id=@Id";
                int    i   = conn.Execute(sql, parameters);
                return(i);
            }
        }
Example #2
0
 /// <summary>
 /// 添加特别签录
 /// </summary>
 /// <param name="entry"></param>
 /// <returns></returns>
 public int AddSpecialSignTheRecord(SpecialSignTheRecord special)
 {
     using (MySqlConnection conn = DapperHelper.GetConnString())
     {
         DynamicParameters parameters = new DynamicParameters();
         parameters.Add("@StaffId", special.StaffId, null, null, null);
         parameters.Add("@Name", special.Name, null, null, null);
         parameters.Add("@Department", special.Department, null, null, null);
         parameters.Add("@AttendanceDate", special.AttendanceDate, null, null, null);
         parameters.Add("@AttendanceTypes", special.AttendanceTypes, null, null, null);
         parameters.Add("@SignInDate", special.SignInDate, null, null, null);
         parameters.Add("@SignOutDate", special.SignOutDate, null, null, null);
         parameters.Add("@AlterSignInDate", special.AlterSignInDate, null, null, null);
         parameters.Add("@AlterSignOutDate", special.AlterSignOutDate, null, null, null);
         parameters.Add("@ThoseSign", special.ThoseSign, null, null, null);
         parameters.Add("@SignedTime", special.SignedTime, null, null, null);
         parameters.Add("@SpecialSign", special.SpecialSign, null, null, null);
         string sql = "insert into specialsigntherecord(StaffId,Name,Department,AttendanceDate,AttendanceTypes,SignInDate,SignOutDate,AlterSignInDate,AlterSignOutDate,ThoseSign,SignedTime,SpecialSign) values (@StaffId,@Name,@Department,@AttendanceDate,@AttendanceTypes,@SignInDate,@SignOutDate,@AlterSignInDate,@AlterSignOutDate,@ThoseSign,@SignedTime,@SpecialSign)";
         int    i   = conn.Execute(sql, parameters);
         return(i);
     }
 }
        public int UpdateSpecialSignTheRecord(SpecialSignTheRecord special)
        {
            int i = specialSign.UpdateSpecialSignTheRecord(special);

            return(i);
        }
        public int AddSpecialSignTheRecord(SpecialSignTheRecord special)
        {
            int i = specialSign.AddSpecialSignTheRecord(special);

            return(i);
        }