예제 #1
0
        private EmpolyeeOR SetValue()
        {
            EmpolyeeOR m_Base = new EmpolyeeOR();
            m_Base.EmpolyeeCode = txtEmpolyeeCode.Text;//员工编号
            m_Base.EmpolyeeRfid = txtEmpolyeeRfid.Text;//员工RFID
            m_Base.EmpolyeeName = txtEmpolyeeName.Text;//员工名称
            m_Base.EmpolyeePy = txtEmpolyeePy.Text;//员工拼音缩写
            m_Base.EmpolyeeSex = dpdEmpolyeeSex.Text;//员工性别
            if (!string.IsNullOrEmpty(txtEmpolyeeBirth.Text))
            {
                m_Base.EmpolyeeBirth = Convert.ToDateTime(txtEmpolyeeBirth.Text);//员工出生日期
            }
            if (!string.IsNullOrEmpty(txtEmpolyeeEntryDate.Text))
            {
                m_Base.EmpolyeeEntryDate = Convert.ToDateTime(txtEmpolyeeEntryDate.Text);//员工入职日期
            }
            m_Base.EmpolyeePhone = txtEmpolyeePhone.Text;//员工手机号
            m_Base.EmpolyeeEmail = txtEmpolyeeEmail.Text;//员工电子邮箱
            m_Base.EmpolyeeAddress = txtEmpolyeeAddress.Text;//员工联系地址
            m_Base.EmpolyeeHometown = txtEmpolyeeHometown.Text;//员工籍贯
            m_Base.EmpolyeeCardId = txtEmpolyeeCardId.Text;//员工身份证号
            m_Base.UserId = txtUserId.Text;//用户ID
            m_Base.UserPwd = txtUserPwd.Text;//用户密码

            return m_Base;
        }
예제 #2
0
파일: EmpolyeeDA.cs 프로젝트: Jitlee/LPS
 /// <summary>
 /// 插入t_Base_Empolyee
 /// </summary>
 public virtual bool Insert(EmpolyeeOR baseEmpolyee)
 {
     string sql = @"insert into t_Base_Empolyee (EMPOLYEE_ID, EMPOLYEE_CODE, EMPOLYEE_RFID, EMPOLYEE_NAME, EMPOLYEE_PY, EMPOLYEE_SEX,
     EMPOLYEE_BIRTH, EMPOLYEE_ENTRY_DATE, EMPOLYEE_PHONE, EMPOLYEE_EMAIL, EMPOLYEE_ADDRESS, EMPOLYEE_HOMETOWN, EMPOLYEE_CARD_ID, USER_ID, USER_PWD,
     EMPOLYEE_CREATE_DATE, EMPOLYEE_IS_DELETED)
     values (@EMPOLYEE_ID, @EMPOLYEE_CODE, @EMPOLYEE_RFID, @EMPOLYEE_NAME, @EMPOLYEE_PY, @EMPOLYEE_SEX, @EMPOLYEE_BIRTH, @EMPOLYEE_ENTRY_DATE,
     @EMPOLYEE_PHONE, @EMPOLYEE_EMAIL, @EMPOLYEE_ADDRESS, @EMPOLYEE_HOMETOWN, @EMPOLYEE_CARD_ID, @USER_ID, @USER_PWD
     ,now(), 'N')";
     return db.ExecuteNoQuery(sql,
         db.GetDataParameter("@EMPOLYEE_ID", baseEmpolyee.EmpolyeeId),
         db.GetDataParameter("@EMPOLYEE_CODE", baseEmpolyee.EmpolyeeCode),
         db.GetDataParameter("@EMPOLYEE_RFID", baseEmpolyee.EmpolyeeRfid),
         db.GetDataParameter("@EMPOLYEE_NAME", baseEmpolyee.EmpolyeeName),
         db.GetDataParameter("@EMPOLYEE_PY", baseEmpolyee.EmpolyeePy),
         db.GetDataParameter("@EMPOLYEE_SEX", baseEmpolyee.EmpolyeeSex),
         db.GetDataParameter("@EMPOLYEE_BIRTH", baseEmpolyee.EmpolyeeBirth),
         db.GetDataParameter("@EMPOLYEE_ENTRY_DATE", baseEmpolyee.EmpolyeeEntryDate),
         db.GetDataParameter("@EMPOLYEE_PHONE", baseEmpolyee.EmpolyeePhone),
         db.GetDataParameter("@EMPOLYEE_EMAIL", baseEmpolyee.EmpolyeeEmail),
         db.GetDataParameter("@EMPOLYEE_ADDRESS", baseEmpolyee.EmpolyeeAddress),
         db.GetDataParameter("@EMPOLYEE_HOMETOWN", baseEmpolyee.EmpolyeeHometown),
         db.GetDataParameter("@EMPOLYEE_CARD_ID", baseEmpolyee.EmpolyeeCardId),
         db.GetDataParameter("@USER_ID", baseEmpolyee.UserId),
         db.GetDataParameter("@USER_PWD", baseEmpolyee.UserPwd)
         //db.GetDataParameter("@EMPOLYEE_CREATE_DATE", baseEmpolyee.EmpolyeeCreateDate),
         //db.GetDataParameter("@EMPOLYEE_IS_DELETED", baseEmpolyee.EmpolyeeIsDeleted),
         //db.GetDataParameter("@EMPOLYEE_DELETED_DATE", baseEmpolyee.EmpolyeeDeletedDate)
     ) > 0;
 }
예제 #3
0
파일: EmpolyeeDA.cs 프로젝트: Jitlee/LPS
 /// <summary>
 /// 更新t_Base_Empolyee
 /// </summary>
 public virtual bool Update(EmpolyeeOR baseEmpolyee)
 {
     string sql = @"update t_Base_Empolyee set  EMPOLYEE_CODE = @EMPOLYEE_CODE,  EMPOLYEE_RFID = @EMPOLYEE_RFID,  EMPOLYEE_NAME = @EMPOLYEE_NAME,  EMPOLYEE_PY = @EMPOLYEE_PY
     ,EMPOLYEE_SEX = @EMPOLYEE_SEX,  EMPOLYEE_BIRTH = @EMPOLYEE_BIRTH,  EMPOLYEE_ENTRY_DATE = @EMPOLYEE_ENTRY_DATE,  EMPOLYEE_PHONE = @EMPOLYEE_PHONE,  EMPOLYEE_EMAIL = @EMPOLYEE_EMAIL
     ,EMPOLYEE_ADDRESS = @EMPOLYEE_ADDRESS,  EMPOLYEE_HOMETOWN = @EMPOLYEE_HOMETOWN,  EMPOLYEE_CARD_ID = @EMPOLYEE_CARD_ID,  USER_ID = @USER_ID,  USER_PWD = @USER_PWD
     where  EMPOLYEE_ID = @EMPOLYEE_ID";
     return db.ExecuteNoQuery(sql,
         db.GetDataParameter("@EMPOLYEE_ID", baseEmpolyee.EmpolyeeId),
         db.GetDataParameter("@EMPOLYEE_CODE", baseEmpolyee.EmpolyeeCode),
         db.GetDataParameter("@EMPOLYEE_RFID", baseEmpolyee.EmpolyeeRfid),
         db.GetDataParameter("@EMPOLYEE_NAME", baseEmpolyee.EmpolyeeName),
         db.GetDataParameter("@EMPOLYEE_PY", baseEmpolyee.EmpolyeePy),
         db.GetDataParameter("@EMPOLYEE_SEX", baseEmpolyee.EmpolyeeSex),
         db.GetDataParameter("@EMPOLYEE_BIRTH", baseEmpolyee.EmpolyeeBirth),
         db.GetDataParameter("@EMPOLYEE_ENTRY_DATE", baseEmpolyee.EmpolyeeEntryDate),
         db.GetDataParameter("@EMPOLYEE_PHONE", baseEmpolyee.EmpolyeePhone),
         db.GetDataParameter("@EMPOLYEE_EMAIL", baseEmpolyee.EmpolyeeEmail),
         db.GetDataParameter("@EMPOLYEE_ADDRESS", baseEmpolyee.EmpolyeeAddress),
         db.GetDataParameter("@EMPOLYEE_HOMETOWN", baseEmpolyee.EmpolyeeHometown),
         db.GetDataParameter("@EMPOLYEE_CARD_ID", baseEmpolyee.EmpolyeeCardId),
         db.GetDataParameter("@USER_ID", baseEmpolyee.UserId),
         db.GetDataParameter("@USER_PWD", baseEmpolyee.UserPwd)
         //db.GetDataParameter("@EMPOLYEE_CREATE_DATE", baseEmpolyee.EmpolyeeCreateDate),
         //db.GetDataParameter("@EMPOLYEE_IS_DELETED", baseEmpolyee.EmpolyeeIsDeleted),
         //db.GetDataParameter("@EMPOLYEE_DELETED_DATE", baseEmpolyee.EmpolyeeDeletedDate)
     ) > 0;
 }
예제 #4
0
파일: EmpolyeeDA.cs 프로젝트: Jitlee/LPS
        public EmpolyeeOR sp_UserLogin(string userID, string UsrPwd)
        {
            string sql = "select * from t_base_empolyee WHERE EMPOLYEE_CODE=@EMPOLYEE_CODE and USER_PWD=@USER_PWD";

            EmpolyeeOR m_User = db.ExecuteGet<EmpolyeeOR>(sql, (dr) => { return new EmpolyeeOR(dr); }
                    , db.GetDataParameter("@EMPOLYEE_CODE", userID)
                    , db.GetDataParameter("@USER_PWD", UsrPwd));
            if (m_User == null)
            {
                //UsersOR user = this.selectARowDate(userID);
                //if (user != null)
                //    throw new Exception("密码错误!");
                //else
                m_User = new EmpolyeeOR();
                m_User.Result = 1;
                m_User.ResultMsg="用户名或密码错误!";
            }
            return m_User;
        }