Exemple #1
0
 private static SqlParameter[] CreateSqlParameter(TMSMissingScanTime model)
 {
     return(new SqlParameter[]
     {
         new SqlParameter("@EntityID", model.EntityID),
         new SqlParameter("@EmployeeNo", model.EmployeeNo),
         new SqlParameter("@EmployeeCode", model.EmployeeCode),
         new SqlParameter("@FirstName_EN", model.FirstName_EN),
         new SqlParameter("@MiddleName_EN", model.MiddleName_EN),
         new SqlParameter("@LastName_EN", model.LastName_EN),
         new SqlParameter("@Work_Date", model.Work_Date),
         new SqlParameter("@InTime", model.InTime),
         new SqlParameter("@OutTime", model.OutTime),
         new SqlParameter("@ST_InTime", model.ST_InTime),
         new SqlParameter("@ST_OutTime", model.ST_OutTime),
         new SqlParameter("@DirectManager", model.DirectManager),
         new SqlParameter("@DomainId", model.DomainId),
     });
 }
Exemple #2
0
        private static TMSMissingScanTime GetItemFromReader(IDataReader dataReader)
        {
            TMSMissingScanTime objItem = new TMSMissingScanTime();

            objItem.EntityID = SqlHelper.GetInt(dataReader, "EntityID");

            objItem.EmployeeNo = SqlHelper.GetString(dataReader, "EmployeeNo");

            objItem.EmployeeCode = SqlHelper.GetInt(dataReader, "EmployeeCode");

            objItem.FirstName_EN = SqlHelper.GetString(dataReader, "FirstName_EN");

            objItem.MiddleName_EN = SqlHelper.GetString(dataReader, "MiddleName_EN");

            objItem.LastName_EN = SqlHelper.GetString(dataReader, "LastName_EN");

            objItem.Work_Date = SqlHelper.GetDateTime(dataReader, "Work_Date");

            objItem.InTime = SqlHelper.GetDateTime(dataReader, "InTime");

            objItem.OutTime = SqlHelper.GetDateTime(dataReader, "OutTime");

            objItem.ST_InTime = SqlHelper.GetDateTime(dataReader, "ST_InTime");

            objItem.ST_OutTime = SqlHelper.GetDateTime(dataReader, "ST_OutTime");

            objItem.DirectManager = SqlHelper.GetInt(dataReader, "DirectManager");

            objItem.DomainId = SqlHelper.GetString(dataReader, "DomainId");

            if (SqlHelper.ColumnExists(dataReader, "TotalRecord"))
            {
                objItem.TotalRecord = SqlHelper.GetInt(dataReader, "TotalRecord");
            }
            return(objItem);
        }