public SignConTemp(SignSocketClient sc, string ID, int type) : this() { _sc = sc; Id = ID; _type = type; }
public ReSubmitConTemp(SignSocketClient sc, HDJContractWithWorkload contract) : this() { this._sc = sc; this.Id = contract.Id; this.hdj = contract; }
public ReSubmitConTemp(SignSocketClient sc, HDJContract contract) : this() { this._sc = sc; this.Id = contract.Id; this.Contract = contract; }
public EditEmployee(Employee employee, SignSocketClient sc) :this() { this.m_employee = employee; this.m_id = -1; this._sc = sc; this.m_isRepicture = false; // 初始化不修改签字图片 }
public EditEmployee(int employeeId, SignSocketClient sc) : this() { this.m_id = employeeId; this.m_employee = null; this._sc = sc; this.m_isRepicture = false; }
public SubmitManage(int SelectedIndex, SignSocketClient sc) : this() { this.Submit.SelectedIndex = SelectedIndex; _sc = sc; /// modify by gatieme @ 2016-01-22 // 初始化, 未添加工作量集合 //this.m_isAddWorkload = false; }
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; }
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; // 用户修改自己的信息和管理员修改时看到的不一样 }
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(); }
public ReSubmitConTemp(SignSocketClient sc, string ID) : this() { _sc = sc; Id = ID; }
public AdminManage(int selectedIndex, SignSocketClient sc) : this() { this.Admin.SelectedIndex = selectedIndex; _sc = sc; }
public ReportManage(int selectedIndex, SignSocketClient sc) : this() { this.ReportAnalysis.SelectedIndex = selectedIndex; _sc = sc; }
public AddConTemp(SignSocketClient sc) : this() { _sc = sc; }
public SubmitManage(int SelectedIndex,SignSocketClient sc) : this() { this.Submit.SelectedIndex = SelectedIndex; _sc = sc; }
public EditDepartment(SDepartment sdepartment, SignSocketClient sc) : this() { this.m_sdepartment = sdepartment; this._sc = sc; }
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); } } }
public EditConTemp(int ConTempId, SignSocketClient sc) : this() { Id = ConTempId; _sc = sc; }
/// <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(); }
public MainWindow(SignSocketClient sc) : this() { _sc = sc; }
/// <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(); }
/// <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(); }