protected void btnSave_Click(object sender, EventArgs e)
        {
            if (Convert.ToInt32(rtvCompetencyValue.SelectedValue) < 0)
            {
                ShowError(Exception.UnselectedEmployee);
                return;
            }

            var humanResourcesManager = new HumanResourcesManager(this);
            Employee employee = humanResourcesManager.GetEmployee(Company.CompanyId,
                                                            Convert.ToInt32(rtvCompetencyValue.SelectedValue));
            if (employee == null)
            {
                ShowError(Exception.unavailableEmployee);
                return;
            }

            humanResourcesManager.SetEmployeeCompetency(employee,
                                                  ucCurrFieldPurchaseCeilingValue.CurrencyValue,
                                                  rbtCentralBuyer.Checked);

            rtvCompetencyValue.DataBind();

            pnlPurchaseCeilingValue.Visible = false;
            ucCurrFieldPurchaseCeilingValue.CurrencyValue = null;
        }
Пример #2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (Convert.ToInt32(rtvCompetencyValue.SelectedValue) < 0)
            {
                ShowError(Exception.UnselectedEmployee);
                return;
            }

            var      humanResourcesManager = new HumanResourcesManager(this);
            Employee employee = humanResourcesManager.GetEmployee(Company.CompanyId,
                                                                  Convert.ToInt32(rtvCompetencyValue.SelectedValue));

            if (employee == null)
            {
                ShowError(Exception.unavailableEmployee);
                return;
            }

            humanResourcesManager.SetEmployeeCompetency(employee,
                                                        ucCurrFieldPurchaseCeilingValue.CurrencyValue,
                                                        rbtCentralBuyer.Checked);

            rtvCompetencyValue.DataBind();

            pnlPurchaseCeilingValue.Visible = false;
            ucCurrFieldPurchaseCeilingValue.CurrencyValue = null;
        }