Ejemplo n.º 1
0
 public SignConTemp(SignSocketClient sc, string ID, int type)
     : this()
 {
     _sc = sc;
     Id = ID;
     _type = type;
 }
Ejemplo n.º 2
0
        public ReSubmitConTemp(SignSocketClient sc, HDJContractWithWorkload contract)
            : this()
        {
            this._sc = sc;
            this.Id = contract.Id;
            this.hdj = contract;

        }
Ejemplo n.º 3
0
        public ReSubmitConTemp(SignSocketClient sc, HDJContract contract)
            : this()
        {
            this._sc = sc;
            this.Id = contract.Id;
            this.Contract = contract;

        }
Ejemplo n.º 4
0
 public EditEmployee(Employee employee, SignSocketClient sc)
 :this()
 {
     this.m_employee = employee;
     this.m_id = -1;
     this._sc = sc;
     
     this.m_isRepicture = false;         //  初始化不修改签字图片
 }
Ejemplo n.º 5
0
        public EditEmployee(int employeeId, SignSocketClient sc)
            : this()
        {
            this.m_id = employeeId;
            this.m_employee = null;
            this._sc = sc;

            this.m_isRepicture = false;
        }
Ejemplo n.º 6
0
        public SubmitManage(int SelectedIndex, SignSocketClient sc)
            : this()
        {
            this.Submit.SelectedIndex = SelectedIndex;
            _sc = sc;

            ///  modify by gatieme @ 2016-01-22
            //  初始化, 未添加工作量集合
            //this.m_isAddWorkload = false;
        }
Ejemplo n.º 7
0
        public EditItem(String categoryName, String projectName, ContractItem item, SignSocketClient sc)
            : this()
        {
            this.m_categoryName = categoryName;
            this.m_projectName = projectName;

            this.m_item = item;

            _sc = sc;
        }
Ejemplo n.º 8
0
        public EditEmployee(int employeeId, SignSocketClient sc, ModifyEmployeeType type)
            : this()
        {
            this.m_id = employeeId;
            this.m_employee = null;
            this._sc = sc;

            this.m_isRepicture = false;
            this.m_type = type;         //  用户修改自己的信息和管理员修改时看到的不一样
        }
Ejemplo n.º 9
0
        public UserManage(int selectedIndex, SignSocketClient sc)
            : this()
        {
            this.Users.SelectedIndex = selectedIndex;
            this._sc = sc;

            //  设置用户名text框显示用户名
            //this.textUsername.BackColor = System.Drawing.SystemColors.Control;
            //this.textUsername.BorderStyle = System.Windows.Forms.BorderStyle.None;

            //  显示个人信息
            this.BindEmployee();

        }
Ejemplo n.º 10
0
 public ReSubmitConTemp(SignSocketClient sc, string ID)
     : this()
 {
     _sc = sc;
     Id = ID;
 }
Ejemplo n.º 11
0
 public AdminManage(int selectedIndex, SignSocketClient sc)
     : this()
 {
     this.Admin.SelectedIndex = selectedIndex;
     _sc = sc;
 }
Ejemplo n.º 12
0
 public ReportManage(int selectedIndex, SignSocketClient sc)
     : this()
 {
     this.ReportAnalysis.SelectedIndex = selectedIndex;
     _sc = sc;
 }
Ejemplo n.º 13
0
 public AddConTemp(SignSocketClient sc)
     : this()
 {
     _sc = sc;
 }
Ejemplo n.º 14
0
 public SubmitManage(int SelectedIndex,SignSocketClient sc)
     : this()
 {
     this.Submit.SelectedIndex = SelectedIndex;
     _sc = sc;
 }
Ejemplo n.º 15
0
 public EditDepartment(SDepartment sdepartment, SignSocketClient sc)
     : this()
 {
     this.m_sdepartment = sdepartment;
     this._sc = sc;
 }
Ejemplo n.º 16
0
        private async void Submit_Click(object sender, EventArgs e)                       //登陆验证
        {
            string username = this.UserName.Text.Trim();
            string password = this.PassWord.Text.Trim();

            if (username == "")
            {
                errormessage.IsBalloon = true;
                errormessage.SetToolTip(this.UserName, "请填写用户名后再登录");
                errormessage.Show("请填写用户名后再登录", this.UserName, 1, this.UserName.Height / 2, 2000);
                errormessage.UseFading = false;
                UserName.Focus();
                return;
            }
            else if (password == "")
            {
                errormessage.IsBalloon = true;
                errormessage.SetToolTip(this.PassWord, "请填写密码后再登录");
                errormessage.Show("请填写密码后再登录", this.PassWord, 1, this.PassWord.Height / 2, 2000);
                errormessage.UseFading = false;
                PassWord.Focus();
                return;
            }
            else
            {
                User user = new User();
                //BUser bUser = new BUser();
                FileStream fs = new FileStream("data.bin", FileMode.Create);
                BinaryFormatter bf = new BinaryFormatter();
                user.Username = username;
                if (this.RemeberPassword.Checked)       //  如果单击了记住密码的功能
                {   //  在文件中保存密码
                    user.Password = password;
                }
                else
                {   //  不在文件中保存密码
                    user.Password = "";
                }
                
                //  选在集合中是否存在用户名 
                if (users.ContainsKey(user.Username))
                {
                    users.Remove(user.Username);
                }
                users.Add(user.Username, user);
                //要先将User类先设为可以序列化(即在类的前面加[Serializable])
                bf.Serialize(fs, users);
                //user.Password = this.PassWord.Text;
                fs.Close();
            
                try
                {
                    _sc = new SignSocketClient();
                    cmd.ShowOpaqueLayer(AllForm, 125, true, true, "正在登录");
                    Employee emp = new Employee();

                    emp = await _sc.Login(username, password);

                    if (emp != null)
                    {
                        UserHelper.UserInfo = emp;
                        this.DialogResult = DialogResult.OK;
                        cmd.HideOpaqueLayer();
                        this.Close();
                        
                        Logging.AddLog("用户:" + emp.Name + "登陆成功!");
                    }
                    else
                    {
                        cmd.HideOpaqueLayer();
                        PassWord.Text = "";
                        errormessage.IsBalloon = true;
                        errormessage.SetToolTip(this.PassWord, "用户名与密码不匹配");
                        errormessage.Show("用户名与密码不匹配", this.PassWord, 1, this.PassWord.Height / 2, 2000);
                        errormessage.UseFading = false;
                        PassWord.Focus();
                        return;
                    }
                }
                catch
                {
                    MessageBox.Show("无法连接服务器", "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
Ejemplo n.º 17
0
 public EditConTemp(int ConTempId, SignSocketClient sc)
     : this()
 {
     Id = ConTempId;
     _sc = sc;
 }
Ejemplo n.º 18
0
        /// <summary>
        /// 加载业务及报表管理窗体
        /// </summary>
        /// <param name="selectedIndex"></param>
        private void CreateReportChildForm(int selectedIndex,SignSocketClient sc)
        {
            if (this.MdiChildren != null)
            {
                foreach (Form form in this.MdiChildren)
                {
                    if (form.Name == "ReportManage")
                    {
                        form.Close();
                    }
                }
            }
            ReportManage report = new ReportManage(selectedIndex, sc);
            report.MdiParent = this;
            report.Dock = DockStyle.Fill;
            report.Show();

        }
Ejemplo n.º 19
0
 public MainWindow(SignSocketClient sc)
     : this()
 {
     _sc = sc;
 }
Ejemplo n.º 20
0
 /// <summary>
 /// 加载管理员信息管理窗体
 /// </summary>
 /// <param name="selectedIndex"></param>
 /// <param name="sc"></param>
 private void CreatAdminChildForm(int selectedIndex,SignSocketClient sc)
 {
     if (this.MdiChildren != null)
     {
         foreach (Form form in this.MdiChildren)
         {
             if (form.Name == "AdminManage")
             {
                 form.Close();
             }
         }
     }
     AdminManage admin = new AdminManage(selectedIndex, sc);
     admin.MdiParent = this;
     admin.Dock = DockStyle.Fill;
     admin.Show();
 }
Ejemplo n.º 21
0
 /// <summary>
 /// 加载提交管理窗体
 /// </summary>
 /// <param name="selectedIndex"></param>
 /// <param name="sc"></param>
 private void CreatSubmitChildForm(int selectedIndex,SignSocketClient sc)
 {
     if (this.MdiChildren != null)
     {
         foreach (Form form in this.MdiChildren)
         {
             if (form.Name == "SubmitManage")
             {
                 form.Close();
             }
         }
     }
     SubmitManage sub = new SubmitManage(selectedIndex, sc);
     sub.MdiParent = this;
     sub.Dock = DockStyle.Fill;
     sub.Show();
 }