示例#1
0
 public AddInsideContemp(int type, SignSocketClient sc)
     : this()
 {
     _sc = sc;
     //获取是添加的什么类型模版
     Type = type;
 }
示例#2
0
 public SignConTemp(SignSocketClient sc, string ID, int type)
     : this()
 {
     _sc   = sc;
     Id    = ID;
     _type = type;
 }
示例#3
0
 public EditProject(string categoryName, ContractProject project, SignSocketClient sc)
     : this()
 {
     this.m_categoryName = categoryName;
     this.m_project      = project;
     _sc = sc;
 }
示例#4
0
 public ViewContempInside(int ConTempId, SignSocketClient sc, int type)
     : this()
 {
     Id    = ConTempId;
     _sc   = sc;
     _type = type;
 }
示例#5
0
 public ReSubmitConTemp(SignSocketClient sc, HDJContractWithWorkload contract)
     : this()
 {
     this._sc = sc;
     this.Id  = contract.Id;
     this.hdj = contract;
 }
示例#6
0
 public SignConTempInside(SignSocketClient sc, string ID, int type)
     : this()
 {
     _sc = sc;
     //会签单的编号
     Id    = ID;
     _type = type;
 }
示例#7
0
        public EditEmployee(int employeeId, SignSocketClient sc)
            : this()
        {
            this.m_id       = employeeId;
            this.m_employee = null;
            this._sc        = sc;

            this.m_isRepicture = false;
        }
示例#8
0
        public EditEmployee(Employee employee, SignSocketClient sc)
            : this()
        {
            this.m_employee = employee;
            this.m_id       = -1;
            this._sc        = sc;

            this.m_isRepicture = false;         //  初始化不修改签字图片
        }
示例#9
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;
        }
示例#10
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;  //  用户修改自己的信息和管理员修改时看到的不一样
        }
示例#11
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();
        }
示例#12
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();
        }
示例#13
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();
        }
示例#14
0
        public SubmintContempJHLX(int contempId, SignSocketClient sc) : this()
        {
            _sc = sc;
            //下拉框传过来的选中的模版id
            ContempId = contempId;
            try
            {
                // Templete temp = new Templete();
                //SOCKET查询 界河例行模版
                temp = _sc.GetContractTemplateJHLX(ContempId);

                if (temp != null)
                {
                    UserHelper.SelectedTemp = temp;
                }

                this.ConTempName.Text = temp.Name.ToString();
                this.Column1.Text     = temp.ColumnNames[0].ToString();
                this.Column2.Text     = temp.ColumnNames[1].ToString();
                this.Column3.Text     = temp.ColumnNames[2].ToString();
                this.Column4.Text     = temp.ColumnNames[3].ToString();
                this.Column5.Text     = temp.ColumnNames[4].ToString();
                this.Column6.Text     = temp.ColumnNames[5].ToString();

                this.Sign1.Text  = temp.SignDatas[0].SignInfo.ToString();
                this.Sign2.Text  = temp.SignDatas[1].SignInfo.ToString();
                this.Sign3.Text  = temp.SignDatas[2].SignInfo.ToString();
                this.Sign4.Text  = temp.SignDatas[3].SignInfo.ToString();
                this.Sign5.Text  = temp.SignDatas[4].SignInfo.ToString();
                this.Sign6.Text  = temp.SignDatas[5].SignInfo.ToString();
                this.Sign7.Text  = temp.SignDatas[6].SignInfo.ToString();
                this.Sign8.Text  = temp.SignDatas[7].SignInfo.ToString();
                this.Sign9.Text  = temp.SignDatas[8].SignInfo.ToString();
                this.Sign10.Text = temp.SignDatas[9].SignInfo.ToString();


                this.SignPer1.Text  = temp.SignDatas[0].SignEmployee.Name.ToString();
                this.SignPer2.Text  = temp.SignDatas[1].SignEmployee.Name.ToString();
                this.SignPer3.Text  = temp.SignDatas[2].SignEmployee.Name.ToString();
                this.SignPer4.Text  = temp.SignDatas[3].SignEmployee.Name.ToString();
                this.SignPer5.Text  = temp.SignDatas[4].SignEmployee.Name.ToString();
                this.SignPer6.Text  = temp.SignDatas[5].SignEmployee.Name.ToString();
                this.SignPer7.Text  = temp.SignDatas[6].SignEmployee.Name.ToString();
                this.SignPer8.Text  = temp.SignDatas[7].SignEmployee.Name.ToString();
                this.SignPer9.Text  = temp.SignDatas[8].SignEmployee.Name.ToString();
                this.SignPer10.Text = temp.SignDatas[9].SignEmployee.Name.ToString();
            }
            catch
            {
                MessageBox.Show("加载数据失败!");
                Logging.AddLog("提交界河专项模板详细信息失败!");

                if (MessageBox.Show("好吧,我们的程序出现点问题需要重新启动\n点击\"确定\"重启\n点击\"取消\"退出程序?",
                                    "提示",
                                    MessageBoxButtons.OKCancel,
                                    MessageBoxIcon.Question) == DialogResult.OK)
                {
                    Application.Restart();
                }
                else
                {
                    Application.Exit();
                }
            }
        }
示例#15
0
 public EditConTemp(int ConTempId, SignSocketClient sc)
     : this()
 {
     Id  = ConTempId;
     _sc = sc;
 }
示例#16
0
 public AddContempJHLX(int type, SignSocketClient sc)
     : this()
 {
     _sc  = sc;
     Type = type;
 }
示例#17
0
 public EditDepartment(SDepartment sdepartment, SignSocketClient sc)
     : this()
 {
     this.m_sdepartment = sdepartment;
     this._sc           = sc;
 }
示例#18
0
 public MainWindow(SignSocketClient sc)
     : this()
 {
     _sc = sc;
 }
示例#19
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);
                }
            }
        }
示例#20
0
 public ReportManage(int selectedIndex, SignSocketClient sc)
     : this()
 {
     this.ReportAnalysis.SelectedIndex = selectedIndex;
     _sc = sc;
 }
示例#21
0
 public AddConTemp(SignSocketClient sc)
     : this()
 {
     _sc = sc;
 }
示例#22
0
 public ReSubmitConTemp(SignSocketClient sc, string ID)
     : this()
 {
     _sc = sc;
     Id  = ID;
 }
示例#23
0
 public SignManage(int selectedIndex, SignSocketClient sc)
     : this()
 {
     this.Sign.SelectedIndex = selectedIndex;
     _sc = sc;
 }
示例#24
0
 public ViewContempJHLX(int ConTempId, SignSocketClient sc) : this()
 {
     Id  = ConTempId;
     _sc = sc;
 }