private void btnAddPerson_Click(object sender, EventArgs e) { ItRolePresenter rolePresenter = new ItRolePresenter(); var role = (SdItRoleDto)this.iGridRoles.CurrentRow.DataRow; var expert = (SdItExpertDto)this.iGridExperts.CurrentRow.DataRow; if (role != null && expert != null) { UCWeight frm = new UCWeight(); ISE.UILibrary.Utils.UIUtils.SetFrmTrans(frm, "وزن انجام کار", FormBorderStyle.FixedDialog); if (frm.DialogResult != DialogResult.OK) { return; } SdItRoleExpertDto roleExpert = new SdItRoleExpertDto() { Weight = frm.Weight, Itroleid = role.RoleId, Expertid = expert.ItExpertId, Role = role, Expert = expert, Personel = expert.Personel }; if (rolePresenter.AddRoleExpert(roleExpert) != null) { roleExpertBs.Add(roleExpert); } } }
public Framework.Common.Service.Message.ResponseDto UpdateRoleExpert(SdItRoleExpertDto roleExpert) { RoleExpertTDataAccess da = new RoleExpertTDataAccess(); da.Update(roleExpert); return(ResponseBuilder.GetResponse(roleExpert)); }
public SdItRoleExpertDto AddRoleExpert(SdItRoleExpertDto roleExpert) { RoleExpertTDataAccess da = new RoleExpertTDataAccess(); da.Insert(roleExpert); return(roleExpert); }
public bool RemoveRoleExpert(SdItRoleExpertDto roleExpert) { ResponseDto response = roleServiceAdapter.Execute(s => s.RemoveRoleExpert(roleExpert)); if (response.Response.HasException) { return(false); } return(true); }
public SdItRoleExpertDto AddRoleExpert(SdItRoleExpertDto roleExpert) { SdItRoleExpertDto response = roleServiceAdapter.Execute(s => s.AddRoleExpert(roleExpert)); if (response.Response.HasException) { return(null); } roleExpert.RoleExpertId = response.RoleExpertId; return(roleExpert); }