protected void btnAdd_Click(object sender, EventArgs e) { var eh = new HRM_EmpEmployment(); GetValueFromControl(eh); EmpHistList.Add(eh); }
protected void btnSave_Click(object sender, EventArgs e) { try { HRM_Eval objEval = new HRM_Eval(); if (EmpHistList.Count > 0) { objEval = EmpHistList[0]; SetValueFromControl(objEval); } else { objEval = new HRM_Eval(); SetValueFromControl(objEval); EmpHistList.Add(objEval); } CustomList <HRM_Eval> HRM_EvalList = EmpHistList; CustomList <HRM_EvalDet> DelatislList = HRM_EvalDettList; _evalManager.SaveEvalution(ref HRM_EvalList, ref DelatislList); hf_EvalKey.Value = HRM_EvalList[0].EvalKey.ToString(); ((PageBase)this.Page).SuccessMessage = ASL.STATIC.StaticInfo.SavedSuccessfullyMsg; } catch (Exception ex) { ((PageBase)this.Page).ErrorMessage = (ExceptionHelper.getExceptionMessage(ex)); } }