private void btnSave_Click(object sender, EventArgs e)
 {
     if (wagebll.GetEmpBasicWage(cbxEmp.Text) == 0)
     {
         this.btnSave.Enabled = false;
         App_Code.Message.InfoMsg("请先添加此员工的工资基本信息");
         return;
     }
     else
     {
         if (this.CheckInput())
         {
             if (App_Code.Message.QuestionMsg("确定更改吗"))
             {
                 //if (this.AddSalaryInfo() > 0 && UpdateSalary(cbxEmp.Text, decimal.Parse(this.txtNewSalary.Text.Trim())) > 0)
                 if (this.AddSalaryInfo() > 0)
                 {
                     App_Code.Message.InfoMsg("操作成功");
                     this.DialogResult = DialogResult.OK;//返回窗体值
                     Log_BLL.Add(DateTime.Now, "员工工资调整", App_Code.Canshu.LoginName, "员工工资调整", Dns.GetHostName().ToUpperInvariant(), Systems.GetOSNameByUserAgent(Environment.OSVersion.ToString()), 6);
                     this.Close();
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改员工信息
        /// </summary>
        private void UpdateEmp(int id)
        {
            empmodel             = new FinanceSys.PersonnelSys.Model.Employee_Model();
            empmodel.ID          = id;
            empmodel.EmpName     = this.txtName.Text.Trim();
            empmodel.Sex         = cbxSex.Text;
            empmodel.EntryTime   = DateTime.Parse(dtpEntrytime.Text);
            empmodel.DepartID    = int.Parse(cbxDepart.SelectedValue.ToString());
            empmodel.Job         = this.txtJob.Text.Trim();
            empmodel.Mobile      = this.txtMobile.Text.Trim();
            empmodel.OfficePhone = this.txtOffice.Text.Trim();
            empmodel.Status      = cbxState.Text;
            empmodel.Remark      = this.txtRemark.Text.Trim();

            if (empbll.Update(empmodel) > 0)
            {
                App_Code.Message.InfoMsg("修改成功。");
                Log_BLL.Add(DateTime.Now, "员工信息修改", App_Code.Canshu.LoginName, "员工信息修改", Dns.GetHostName().ToUpperInvariant(), Systems.GetOSNameByUserAgent(Environment.OSVersion.ToString()), 3);
                this.Close();
            }
            else
            {
                App_Code.Message.InfoMsg("修改失败。");
            }
        }
Ejemplo n.º 3
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (InputCheck())
     {
         if (InsertIncome() > 0)
         {
             App_Code.Message.InfoMsg("操作成功");
             Log_BLL.Add(DateTime.Now, "财务收入(非合同)", App_Code.Canshu.LoginName, "财务收入(非合同)", Dns.GetHostName().ToUpperInvariant(), Systems.GetOSNameByUserAgent(Environment.OSVersion.ToString()), 8); this.DialogResult = DialogResult.OK;
             this.Close();
         }
     }
 }
 private void btnSave_Click(object sender, EventArgs e)
 {
     //文本框验证 必须返回True
     if (InputCheck())
     {
         //查询发票编号是否存在
         if (SerachInvoiceNo(this.txtInvoiceno.Text.Trim()) == false)
         {
             //if (IsContract() == true)
             //{
             //    AddInvoiceMx();
             //}
             //else
             //{
             if (CheckMonth() == true)
             {
                 if (AddInvoice())
                 {
                     App_Code.Message.InfoMsg("发票开出成功");
                     this.DialogResult = DialogResult.OK;
                     this.UpIncomeMon(this.txtContractno.Text, Convert.ToDecimal(this.txtInvoiceMoney.Text.Trim()), this.cbxIsBank.Text);
                     Log_BLL.Add(DateTime.Now, "开发票", App_Code.Canshu.LoginName, "开发票", Dns.GetHostName().ToUpperInvariant(), Systems.GetOSNameByUserAgent(Environment.OSVersion.ToString()), 10);
                     canshu = "main";
                     Form_OpenInvoice_Load(sender, e);
                 }
                 else
                 {
                     App_Code.Message.ErrorMsg("发票开出失败");
                     return;
                 }
             }
             else
             {
                 App_Code.Message.ErrorMsg("发票开出失败!请联系管理员。");
                 return;
             }
             //}
         }
         else
         {
             App_Code.Message.ErrorMsg("发票编号出现重复");
             return;
         }
     }
 }
Ejemplo n.º 5
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            string username = this.txtusername.Text.Trim().ToLower();
            string userpass = App_Code.Text.MD532(this.txtuserpwd.Text.Trim().ToLower());

            Model.Users_Model usersmodel;

            if (this.Check(username, userpass) == true)
            {
                FinanceSys.PersonnelSys.BLL.Users_BLL Manager = new FinanceSys.PersonnelSys.BLL.Users_BLL();
                if (Manager.Exists(username) == true)
                {
                    if (!Manager.GetUserState(username))
                    {
                        App_Code.Message.InfoMsg("此用户不存在");
                    }
                    else
                    {
                        if (Manager.ValiedUser(username, userpass, out usersmodel) == true)
                        {
                            Form_Main main = new Form_Main();
                            main.LoginName            = username;
                            App_Code.Canshu.LoginName = username;
                            App_Code.Canshu.Name      = usersmodel.Name;
                            main.Show();
                            Log_BLL.Add(DateTime.Now, "登录系统", username, "登录成功", Dns.GetHostName().ToUpperInvariant(), Systems.GetOSNameByUserAgent(Environment.OSVersion.ToString()), 1);
                            this.Hide();
                        }
                        else
                        {
                            App_Code.Message.InfoMsg("用户名或密码错误!");
                            this.txtuserpwd.Focus();
                        }
                    }
                }
                else
                {
                    App_Code.Message.InfoMsg("用户名或密码错误");
                    this.txtusername.Clear();
                    this.txtusername.Focus();
                }
            }
        }
Ejemplo n.º 6
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     if (InputCheck())
     {
         if (conbll.Exists(int.Parse(this.txtcontractno.Text.Trim())) == true)
         {
             App_Code.Message.InfoMsg("合同编号出现重复");
             return;
         }
         else
         {
             if (InsertIncome() == 1 && InsertContract() == 1)
             {
                 App_Code.Message.InfoMsg("操作成功");
                 Log_BLL.Add(DateTime.Now, "财务收入(合同收入)", App_Code.Canshu.LoginName, "财务收入(合同收入)", Dns.GetHostName().ToUpperInvariant(), Systems.GetOSNameByUserAgent(Environment.OSVersion.ToString()), 8);
                 this.DialogResult = DialogResult.OK;
                 this.Close();
             }
         }
     }
 }
Ejemplo n.º 7
0
 private void btnDel_Click(object sender, EventArgs e)
 {
     if (dbgEmp.Rows.Count == 0)
     {
         return;
     }
     else
     {
         DataTable dt = IsNull();
         if (dat != null && dat.Rows.Count > 0)
         {
             if (App_Code.Message.QuestionMsg("确定删除吗"))
             {
                 if (empbll.Delete(int.Parse(dbgEmp.SelectedRows[0].Cells[0].Value.ToString())) > 0)
                 {
                     App_Code.Message.InfoMsg("删除成功");
                     Log_BLL.Add(DateTime.Now, "员工删除", App_Code.Canshu.LoginName, "员工删除", Dns.GetHostName().ToUpperInvariant(), Systems.GetOSNameByUserAgent(Environment.OSVersion.ToString()), 4);
                     this.InitTree();
                     this.InitDbgEmp();
                 }
             }
         }
     }
 }
Ejemplo n.º 8
0
 private void Form_Syslog_Load(object sender, EventArgs e)
 {
     PublicLibrary.BLL.Log_BLL logbll = new Log_BLL();
     dgvLoginlog.DataSource = logbll.GetList();
 }