Beispiel #1
0
 private void BindModel()
 {
     user.Login    = tbLogin.Text;
     user.Password = tbpassword.Text;
     user.UserName = tbUsername.Text;
     user.UserRoll = GloblMain.ConvertFromEnumIntoString(tbSelectRol.SelectedItem.ToString());
 }
Beispiel #2
0
        private void HisobEmployee(int SalaryId)
        {
            decimal summ = 0;

            foreach (var item in GloblMain.dbo.Employees.ToList())
            {
                salaryEmployee.SalaryId   = SalaryId;
                salaryEmployee.EmployeeId = item.EmployeeId;
                salaryEmployee.INNPS      = item.Payment * 0.001;
                salaryEmployee.ENDF       = item.Payment * 0.12 - salaryEmployee.INNPS;
                salaryEmployee.ESP        = item.Payment * 0.12;
                summ += decimal.Parse(item.Payment.ToString());
                salaryEmployee.ApplyChanges();
                salaryEmployee = new SalaryEmployee();
            }
            dgSalary.DataSource = GloblMain.dbo.SalaryEmployees.ToList()
                                  .Where(x => x.SalaryId == SalaryId).ToList();
            if (GloblMain.GetSumOrg(summ))
            {
                MessageBox.Show("Оплачивается ежемесячно с основного счета ");
            }
            else
            {
                MessageBox.Show("На основном счете недостаточно денег ");
            }
        }
Beispiel #3
0
        private void materialRaisedButton1_Click(object sender, EventArgs e)
        {
            var _user = GloblMain.SingIn(tnLogin.Text, tbPassowrd.Text);

            if (_user != null)
            {
                Form1 form1 = new Form1();
                form1.Show();
                this.Hide();
            }
            else
            {
                tbError.Text = "Пользователь не найден";
            }
        }
Beispiel #4
0
 private void BindModel()
 {
     StudentDM.Payment       = true;
     StudentDM.ContractMoney = pirse + decimal.Parse(tbPrace.Text);
     GloblMain.SetSumOrg(StudentDM.ContractMoney);
 }