Esempio n. 1
0
        protected void UpdateDutyKSA(object sender, GridCommandEventArgs e)
        {
            GridEditFormItem editform   = (GridEditFormItem)e.Item;
            long             jQFactorID = (long)editform.GetDataKeyValue("JQFactorID");

            if (jQFactorID > 0)
            {
                JobAnalysisDutyKSAFactor jaDutyKSAFactor = new JobAnalysisDutyKSAFactor(jQFactorID);
                AssignJADutyKSAFactorValues(jaDutyKSAFactor, e);
                jaDutyKSAFactor.Update();
            }
        }
Esempio n. 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);
            }
        }