12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
-
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using LYFZ.Software.MainBusiness.DoorCityProcess;
- namespace LYFZ.Software.MainBusiness.InitialSet
- {
- public partial class FrmPersonalCenter : LYFZ.Software.UI.InitialSet.FrmPersonalCenter
- {
- public delegate void UpdateControl();
- public FrmPersonalCenter()
- {
- }
- #region 加载
- protected override void FrmPersonalCenter_Shown(object sender, EventArgs e)
- {
- try
- {
- LYFZ.BLL.BaseBLL.BaseBLL_ErpUser userbll = new BLL.BaseBLL.BaseBLL_ErpUser();
- string User_EmployeeID = LYFZ.Software.MainBusiness.CommonLogical.SuccessfulLogin.LoginUserModel.User_EmployeeID;
- DataTable dt = userbll.GetList("User_EmployeeID='" + User_EmployeeID + "'").Tables[0];
- if (dt.Rows.Count > 0)
- {
- lblUser_Name.Text = dt.Rows[0]["User_Name"].ToString();
- lblUser_Account.Text = dt.Rows[0]["User_Account"].ToString();
- lblUser_Sex.Text = dt.Rows[0]["User_Sex"].ToString();
- lblUser_Telephone.Text = dt.Rows[0]["User_Telephone"].ToString();
- lblUser_IsMarried.Text = Convert.ToBoolean(dt.Rows[0]["User_IsMarried"].ToString()) == true ? "已婚" : "未婚";
- lblUser_Ethnic.Text = dt.Rows[0]["User_Ethnic"].ToString();
- lblUser_Hometown.Text = dt.Rows[0]["User_Hometown"].ToString();
- lblUser_JobNumber.Text = dt.Rows[0]["User_JobNumber"].ToString();
- lblUser_IdentityCardID.Text = dt.Rows[0]["User_IdentityCardID"].ToString();
- lblUser_NowAddress.Text = dt.Rows[0]["User_NowAddress"].ToString();
- lblUser_HometownAddress.Text = dt.Rows[0]["User_HometownAddress"].ToString();
- System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(delegate()
- {
- try
- {
- this.Invoke(new UpdateControl(delegate()
- {
- if (!string.IsNullOrEmpty(dt.Rows[0]["User_HeadImgePath"].ToString()))
- {
- picUser_HeadImgePath.Image = PublicCodeClasses.GetImage(PublicCodeClasses.StringToByte(dt.Rows[0]["User_HeadImgePath"].ToString()));
- }
- else { this.picUser_HeadImgePath.Image = null; }
- if (!string.IsNullOrEmpty(dt.Rows[0]["User_PositiveID"].ToString()))
- {
- picUser_PositiveID.Image = PublicCodeClasses.GetImage(PublicCodeClasses.StringToByte(dt.Rows[0]["User_PositiveID"].ToString()));
- }
- else { this.picUser_PositiveID.Image = null; }
- if (!string.IsNullOrEmpty(dt.Rows[0]["User_IDNegative"].ToString()))
- {
- picUser_IDNegative.Image = PublicCodeClasses.GetImage(PublicCodeClasses.StringToByte(dt.Rows[0]["User_IDNegative"].ToString()));
- }
- else { this.picUser_IDNegative.Image = null; }
- }));
- }
- catch { }
- }));
- t.Start();
- }
- }
- catch (Exception ex)
- {
- MessageBoxCustom.Show(ex.Message);
- }
- }
- #endregion
- }
- }
|