Ejemplo n.º 1
0
        /// <summary>
        /// 获取快开厅员工
        /// <param name="staffId">员工编号</param>
        /// </summary>
        /// <returns>快开厅员工对象</returns>
        public TBStaffClon GetClon(string staffId)
        {
            TBStaffClon tbStaffClon = null;

            try
            {
                string strSQL = "select a.*,b.roleId,b.userCode from TBStaff a,TSAgentUser b  where a.staffId=b.userId and b.roleId!='001' and a.staffId=:staffId";
                Param  param  = new Param();
                param.Clear();
                param.Add(":staffId", staffId);
                db.Open();
                ComDataReader dr = db.ExecuteReader(CommandType.Text, strSQL, param);
                if (dr.Read())
                {
                    tbStaffClon = ReadDataClon(dr);
                }
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
                db.Close();
            }
            return(tbStaffClon);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 加载指定快开厅员工
 /// <param name="staffId">员工编号</param>
 /// </summary>
 public void Load(string staffId)
 {
     try
     {
         TBStaffClon tbStaffClon = tbStaffDAO.GetClon(staffId);
         tbStaffClon.status = "1".Equals(tbStaffClon.status) ? "on" : "off";
         WebJson.ToJson(context, tbStaffClon);
     }
     catch (Exception e)
     {
         Message.error(context, e.Message);
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 读取快开厅员工信息
        /// <param name="dr">记录指针</param>
        /// </summary>
        /// <returns>快开厅员工对象</returns>
        private TBStaffClon ReadDataClon(ComDataReader dr)
        {
            TBStaffClon tbStaffClon = new TBStaffClon();

            tbStaffClon.staffId   = dr["staffId"].ToString();   //员工编号
            tbStaffClon.siteId    = dr["siteId"].ToString();    //快开厅编号
            tbStaffClon.agentId   = dr["agentId"].ToString();   //代理商编号
            tbStaffClon.staffName = dr["staffName"].ToString(); //员工姓名
            tbStaffClon.status    = dr["status"].ToString();    //使用状态
            tbStaffClon.telephone = dr["telephone"].ToString(); //手机号码
            tbStaffClon.IDNumber  = dr["IDNumber"].ToString();  //身份证号
            tbStaffClon.address   = dr["address"].ToString();   //住址
            tbStaffClon.remark    = dr["remark"].ToString();    //备注
            tbStaffClon.staffCode = dr["userCode"].ToString();  //用户帐号
            tbStaffClon.roleId    = dr["roleId"].ToString();    //角色
            return(tbStaffClon);
        }