protected void Page_Load(object sender, EventArgs e)
 {
     string UserID = Convert.ToString(Session["UserID"]);
     UI = new JCPT().SelectUserInfo(UserID);
     if (!Page.IsPostBack)
     {
         InitiData();
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     string UserID = Convert.ToString(Session["UserID"]);
     UI = new JCPT().SelectUserInfo(UserID);
     if (!Page.IsPostBack)
     {
         MyApply.GetType(this.drgType);
         RefreshGrid();
     }
 }
 private void InitiData()
 {
     string UserID = Convert.ToString(Session["UserID"]);
     UI = new JCPT().SelectUserInfo(UserID);
     this.lblUserName.Text = UI.LoginName;
     this.lblRealName.Text = UI.RealName;
     this.lblCorpName.Text = Convert.ToString(Session["CompanyName"]); ;
     this.lblGroundName.Text = UI.GroupName;
     this.txtTel.Text = UI.Tel;
     this.txtMobile.Text = UI.Mobile;
     this.txtFax.Text = UI.Fax;
     this.txtEmail.Text = UI.Email;
     this.txtAddress.Text = UI.Address;
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     string UserID = Convert.ToString(Session["UserID"]);
     UI = new JCPT().SelectUserInfo(UserID);
     if (!Page.IsPostBack)
     {
         this.lblProposer.Text = Convert.ToString(Session["RealName"]);
         this.lblDept.Text = Convert.ToString(Session["DeptName"]);
         MyApply.GetType(this.drgType);
         MyApply.PurgeBefore();
         RefreshItemDiv();
     }
 }
Exemple #5
0
        /// <summary>
        /// 测试登录
        /// </summary>
        /// <param name="UserName"></param>
        /// <returns></returns>
        public UserInfo SelectUserInfo_Test(string UserName)
        {
            Database db = DatabaseFactory.CreateDatabase(JCPTConnStr);
            string strSql = @"SELECT FU.*,FC.ADDRESS_CH,FC.NAME_FULL,FC.NAME_SHORT,FC.EPORT_CODE FROM FRAME_USERS FU,FRAME_CMP FC WHERE FU.LOGIN_NAME='" + UserName + "' AND FU.CMP_GUID=FC.GUID";

            DbCommand cmd = db.GetSqlStringCommand(strSql);
            DataView dv = db.ExecuteDataView(cmd);
            UserInfo UI = new UserInfo();
            if (dv.Count > 0)
            {
                UI.Address = dv[0]["ADDRESS_CH"].ToString();
                try
                {
                    UI.Birthday = Convert.ToDateTime(dv[0]["BIRTHDAY"]);
                }
                catch
                {
                    UI.Birthday = DateTime.MinValue;
                }
                //UI.Edu = dv[0]["EDU"].ToString();
                UI.Email = dv[0]["EMAIL"].ToString();
                UI.GroupID = dv[0]["DEPT_GUID"].ToString();
                UI.IDNO = dv[0]["IDCARD_NO"].ToString();
                UI.LoginName = dv[0]["LOGIN_NAME"].ToString();
                UI.Mobile = dv[0]["MOBILE"].ToString();
                UI.OrgID = dv[0]["CMP_GUID"].ToString();
                UI.OrgShortName = dv[0]["NAME_SHORT"].ToString();
                UI.OrgFullName = dv[0]["NAME_FULL"].ToString();
                UI.RealName = dv[0]["NAME"].ToString();
                UI.Sex = dv[0]["SEX"].ToString().Trim() == "1" ? "女" : "男";
                UI.Tel = dv[0]["OFFICE_TEL"].ToString();
                UI.UserID = dv[0]["GUID"].ToString();
            }
            return UI;
        }
Exemple #6
0
        /// <summary>
        /// 选择某组的用户
        /// </summary>
        /// <param name="GroupID"></param>
        /// <returns></returns>
        public List<UserInfo> SelectUserInfoByGroup1(string OrgID, string GroupID)
        {
            Database db = DatabaseFactory.CreateDatabase(JCPTConnStr);
            string strSql = @"SELECT FRAME_USERS.GUID,FRAME_USERS.LOGIN_NAME,FRAME_USERS.NAME,FRAME_CMP_DEPT.DEPT_NAME FROM FRAME_USERS,FRAME_CMP_DEPT  WHERE FRAME_USERS.DEPT_GUID=FRAME_CMP_DEPT.GUID AND  FRAME_USERS.DEPT_GUID='" + GroupID + "' AND FRAME_USERS.CMP_GUID='" + OrgID + "' AND FRAME_USERS.IS_DELETED='N' ";

            DbCommand cmd = db.GetSqlStringCommand(strSql);
            DataView dv = db.ExecuteDataView(cmd);
            List<UserInfo> UIList = new List<UserInfo>();
            for (int i = 0; i < dv.Count; i++)
            {
                UserInfo UI = new UserInfo();
                UI.RealName = dv[i]["NAME"].ToString();
                UI.UserID = dv[i]["GUID"].ToString();
                UI.LoginName = dv[i]["LOGIN_NAME"].ToString();
                UI.GroupName = dv[i]["DEPT_NAME"].ToString();
                UIList.Add(UI);
            }
            return UIList;
        }
Exemple #7
0
 /// <summary>
 /// 根据公司ID模糊查询人员
 /// </summary>
 /// <param name="OrgID"></param>
 /// <param name="RealName"></param>
 /// <returns></returns>
 public List<UserInfo> SelectUserInfo(string OrgID, string RealName)
 {
     Database db = DatabaseFactory.CreateDatabase(JCPTConnStr);
     string strSql = "SELECT USER_ID,USER_NAME,REALNAME FROM JCCS.JCCS_CORP_USER WHERE ORG_ID='" + OrgID + "' AND DEL_FLAG='0' ";
     if (RealName != "")
         strSql += " AND REALNAME LIKE '%" + RealName.Replace("'", "") + "%'";
     DbCommand cmd = db.GetSqlStringCommand(strSql);
     DataView dv = db.ExecuteDataView(cmd);
     List<UserInfo> UIList = new List<UserInfo>();
     for (int i = 0; i < dv.Count; i++)
     {
         UserInfo UI = new UserInfo();
         UI.RealName = dv[i]["REALNAME"].ToString();
         UI.UserID = dv[i]["USER_ID"].ToString();
         UI.LoginName = dv[i]["USER_NAME"].ToString();
         UIList.Add(UI);
     }
     return UIList;
 }
Exemple #8
0
        /// <summary>
        /// 获取用户的完整信息
        /// </summary>
        /// <param name="UserID"></param>
        /// <returns></returns>
        public UserInfo SelectUserInfo(string UserID)
        {
            Database db = DatabaseFactory.CreateDatabase(JCPTConnStr);
            string strSql = @"SELECT JCU.*,(SELECT JCUG.CORP_USER_GROUP_NAME FROM JCCS.JCCS_CORP_USER_GROUP JCUG WHERE JCU.CORP_USER_GROUP_ID=JCUG.CORP_USER_GROUP_ID) AS DeptName,
                              (SELECT JC.REG_CO FROM JCCS.JCCS_CORP JC WHERE JCU.ORG_ID=JC.ORG_ID) AS REG_CO FROM JCCS.JCCS_CORP_USER JCU
                              WHERE JCU.USER_ID='" + UserID + "' ";

            DbCommand cmd = db.GetSqlStringCommand(strSql);
            DataView dv = db.ExecuteDataView(cmd);
            UserInfo UI = new UserInfo();
            if (dv.Count > 0)
            {
                UI.Address = dv[0]["ADDRESS"].ToString();
                try
                {
                    UI.Birthday = Convert.ToDateTime(dv[0]["BIRTHDAY"]);
                }
                catch
                {
                    UI.Birthday = DateTime.MinValue;
                }
                UI.Edu = dv[0]["EDU"].ToString();
                UI.Email = dv[0]["EMAIL"].ToString();
                UI.GroupName = dv[0]["DeptName"].ToString();
                UI.IDNO = dv[0]["ID_NO"].ToString();
                UI.LoginName = dv[0]["USER_NAME"].ToString();
                UI.Mobile = dv[0]["MOBILE"].ToString();
                UI.OrgID = dv[0]["ORG_ID"].ToString();
                UI.OrgShortName = dv[0]["REG_CO"].ToString();
                UI.RealName = dv[0]["REALNAME"].ToString();
                UI.Sex = dv[0]["GENDER"].ToString().Trim() == "1" ? "女" : "男";
                UI.Tel = dv[0]["TEL"].ToString();
                UI.UserID = UserID;
            }
            return UI;
        }