protected void MasterPage_YesClickHandler(object sender, EventArgs e) { if (ViewState["Delete"] != null) { try { HubEntity entity = new HubEntity(); entity.OperationId = (int)OperationType.Delete; entity.HubId = Utility.GetLong(ViewState["HubId"]); OperationStatusEntity c = new ConfigrationRepository(SessionContext).UpdateHub(entity); if (c.StatusResult == true) { ShowInfoMessage(c.InfoMessage); ClearPageControl(); FillGrid(); } else { ShowErrorMessage(c.InfoMessage); } } catch (BaseException bex) { ShowErrorMessage(bex.Message); } } }
public OperationStatusEntity UpdateHub(HubEntity param) { var parameters = new object[] { param.OperationId, param.RegionId, param.ZoneId, param.BranchId, param.HubId, param.HubName }; return(EntityBase.FillObject <OperationStatusEntity>("HubManage", parameters)); }
protected void btnSubmit_Click(object sender, EventArgs e) { try { ValidateBusinessData("G1"); ValidateBusinessData("G2"); ValidateBusinessData("G3"); ValidateBusinessData("G4"); HubEntity entity = new HubEntity(); if (Convert.ToString(ViewState["Add"]) == "Add") { entity.OperationId = 1; } else if (Convert.ToString(ViewState["Update"]) == "Update") { entity.OperationId = 2; entity.HubId = Utility.GetLong(ViewState["HubId"]); } entity.HubName = txtHubName.Text.Trim(); entity.RegionId = Utility.GetLong(ddlRegion.SelectedValue); entity.ZoneId = Utility.GetLong(ddlZone.SelectedValue); entity.BranchId = Utility.GetLong(ddlBranch.SelectedValue); OperationStatusEntity c = new ConfigrationRepository(SessionContext).UpdateHub(entity); if (c.StatusResult == true) { ShowInfoMessage(c.InfoMessage); ClearPageControl(); FillGrid(); } else { ShowErrorMessage(c.InfoMessage); } } catch (ValidationException ex) { ShowErrorMessage(ex.Message); } catch (BaseException be) { ShowErrorMessage(be.DisplayMessage); } }
public async Task Recieve <T>(HubEntity <T> entity) { throw new NotImplementedException(); }
public async Task Broadcast <T>(HubEntity <T> entity) { await _context.Clients.Group(entity.Group).broadcast(entity); }