示例#1
0
        protected void AddDutyKSA(object sender, GridCommandEventArgs e)
        {
            JobAnalysisDutyKSAFactor jaDutyKSAFactor = new JobAnalysisDutyKSAFactor();

            AssignJADutyKSAFactorValues(jaDutyKSAFactor, e);
            jaDutyKSAFactor.Add();
        }
示例#2
0
        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            JobAnalysisDutyKSAFactor jaDutyKSAFactor;

            try
            {
                if (CurrentMode == eMode.Insert)
                {
                    if (JADutyID > 0)
                    {
                        jaDutyKSAFactor = new JobAnalysisDutyKSAFactor();
                        AssignValues(jaDutyKSAFactor);
                        jaDutyKSAFactor.Add();
                        lblmsg.Text = "Duty-KSA added successfully.";
                        JQFactorID  = jaDutyKSAFactor.JQFactorID;
                        CurrentMode = eMode.Edit;
                    }
                    else
                    {
                        this.lblError.Text = "Current Job Analysis Duty is not set";
                    }
                }
                else if (CurrentMode == eMode.Edit)
                {
                    jaDutyKSAFactor = new JobAnalysisDutyKSAFactor(JQFactorID);
                    this.JADutyID   = jaDutyKSAFactor.JADutyID;
                    AssignValues(jaDutyKSAFactor);
                    jaDutyKSAFactor.Update();
                    lblmsg.Text = "Duty-KSA updated successfully.";
                }
            }
            catch (Exception ex)
            {
                base.HandleException(ex);
            }
        }