protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         t3.Visible = !WX.Main.Priv_IsTemp;
         t1.Visible = WX.Main.Priv_IsTemp;
         if (t1.Visible)
         {
             //Employee.MODEL employee = Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'");
             WX.Main.CurUser.LoadEmployeeUser();
             WX.Main.CurUser.LoadUserModel(false);
             Employee.MODEL      employee  = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'");
             WX.Model.User.MODEL usermodel = WX.Main.CurUser.UserModel;
             Text_Template.MODEL ttM       = Text_Template.NewDataModel(2);
             if (!ttM.Apply.ToBoolean())
             {
                 this.t1.Visible       = true;
                 this.t2.Visible       = false;
                 this.trSubmit.Visible = usermodel.ArchiveBySelf.ToBoolean();
                 this.ui_content.Value = employee.Education.isEmpty ? ttM.Template.ToString() : employee.Education.ToString();
             }
             else
             {
                 this.t1.Visible        = false;
                 this.t2.Visible        = true;
                 this.lblContent.Text   = employee.Education.ToString();
                 this.ui_content1.Value = ttM.Template.ToString();
             }
         }
     }
 }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //1.验证当前用户页面权限
            if (!this.Master.A_Edit)
            {
                Response.Write("你没有权限访问此功能!");
                Response.End();
                return;
            }
            if (!IsPostBack)
            {
                t3.Visible = !WX.Main.Priv_IsTemp;
                t1.Visible = WX.Main.Priv_IsTemp;
                if (t1.Visible)
                {
                    string         userId   = WX.Request.rUserId;
                    Employee.MODEL employee = WX.Request.rEmpolyee; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'");

                    Text_Template.MODEL ttM = Text_Template.NewDataModel(1);
                    if (!ttM.Apply.ToBoolean())
                    {
                        this.t1.Visible       = true;
                        this.t2.Visible       = false;
                        this.ui_content.Value = employee.Skill.isEmpty ? ttM.Template.ToString() : employee.Skill.ToString();
                    }
                    else
                    {
                        this.t1.Visible        = false;
                        this.t2.Visible        = true;
                        this.lblContent.Text   = employee.Skill.ToString();
                        this.ui_content1.Value = ttM.Template.ToString();
                    }
                }
            }
        }
Exemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     //1.验证当前用户页面权限
     if (!this.Master.A_Edit)
     {
         Response.Write("你没有权限访问此功能!");
         Response.End();
         return;
     }
     if (!IsPostBack)
     {
         t3.Visible = !WX.Main.Priv_IsTemp;
         t1.Visible = WX.Main.Priv_IsTemp;
         if (t1.Visible)
         {
             WX.Main.CurUser.LoadEmployeeUser();
             WX.Main.CurUser.LoadUserModel(false);
             Employee.MODEL      employee = WX.Main.CurUser.EmployeeUser; //Employee.GetModel("SELECT * FROM TU_Employees WHERE UserID='" + userId + "'");
             Text_Template.MODEL ttM      = Text_Template.NewDataModel(3);
             if (!ttM.Apply.ToBoolean())
             {
                 this.t1.Visible       = true;
                 this.t2.Visible       = false;
                 this.trSubmit.Visible = WX.Main.CurUser.UserModel.ArchiveBySelf.ToBoolean();
                 this.ui_content.Value = employee.Work.isEmpty ? ttM.Template.ToString() : employee.Work.ToString();
             }
             else
             {
                 this.t1.Visible        = false;
                 this.t2.Visible        = true;
                 this.lblContent.Text   = employee.Work.ToString();
                 this.ui_content1.Value = ttM.Template.ToString();
             }
         }
     }
 }