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)); } }
protected void btnUpdate_Click(object sender, EventArgs e) { var empHistKey = hfEmpHistKey.Value.ToInt(); var eh = EmpHistList.Find(x => x.EmpEmployKey == empHistKey); GetValueFromControl(eh); eh.SetModified(); }
private void navBarItem18_LinkClicked(object sender, DevExpress.XtraNavBar.NavBarLinkEventArgs e) { panelControl1.Controls.Clear(); EmpHistList eHL = new EmpHistList(); eHL.Dock = DockStyle.Fill; panelControl1.Controls.Add(eHL); btnSearch.Visibility = DevExpress.XtraBars.BarItemVisibility.Never; }
internal void Delete() { EmpHistList.ForEach(x => x.Delete()); //Save(); //var empAddr = new HRM_EmpFamily(); //GetValueFromControl(empAddr); //empAddr.SetUnchanged(); //empAddr.SetDetached(); //var empFam = new CustomList<HRM_EmpFamily>() { empAddr }; //var empFamDet = (CustomList<HRM_EmpFamDet>)EmpFamDetList; //_empManager.SaveEmpFam(ref empFam, ref empFamDet); }