protected void Store1_RefreshData(object sender, StoreReadDataEventArgs e) { //GEtting the filter from the page string filter = string.Empty; int totalCount = 1; //Fetching the corresponding list //in this test will take a list of News PositionListRequest request = new PositionListRequest(); // request.Filter = ""; request.SortBy = "positionRef"; request.Size = e.Limit.ToString(); request.StartAt = e.Start.ToString(); ListResponse <Model.Company.Structure.Position> branches = _branchService.ChildGetAll <Model.Company.Structure.Position>(request); if (!branches.Success) { return; } e.Total = branches.count; this.Store1.DataSource = branches.Items; this.Store1.DataBind(); }
public object FillParent(string action, Dictionary <string, object> extraParams) { StoreRequestParameters prms = new StoreRequestParameters(extraParams); List <Model.Company.Structure.Position> data; PositionListRequest req = new PositionListRequest(); req.StartAt = "0"; req.Size = "1000"; req.SortBy = "positionRef"; ListResponse <Model.Company.Structure.Position> response = _branchService.ChildGetAll <Model.Company.Structure.Position>(req); if (!response.Success) { Common.errorMessage(response); } data = response.Items; return(new { data }); }
private List <Model.Company.Structure.Position> GetPositions() { PositionListRequest positionsRequest = new PositionListRequest(); positionsRequest.StartAt = "0"; positionsRequest.Size = "1000"; positionsRequest.SortBy = "positionRef"; ListResponse <Model.Company.Structure.Position> resp = _companyStructureService.ChildGetAll <Model.Company.Structure.Position>(positionsRequest); if (!resp.Success) { X.Msg.Alert(Resources.Common.Error, GetGlobalResourceObject("Errors", resp.ErrorCode) != null ? GetGlobalResourceObject("Errors", resp.ErrorCode).ToString() + "<br>" + GetGlobalResourceObject("Errors", "ErrorLogId") + resp.LogId : resp.Summary).Show(); return(new List <Model.Company.Structure.Position>()); } return(resp.Items); }
private void FillPosition() { PositionListRequest positionsRequest = new PositionListRequest(); positionsRequest.StartAt = "0"; positionsRequest.Size = "1000"; positionsRequest.SortBy = "positionRef"; ListResponse <Model.Company.Structure.Position> resp = _companyStructureService.ChildGetAll <Model.Company.Structure.Position>(positionsRequest); if (!resp.Success) { Common.errorMessage(resp); } positionStore.DataSource = resp.Items; positionStore.DataBind(); }
private void FillPosition() { if (!EnablePosition) { return; } PositionListRequest branchesRequest = new PositionListRequest(); branchesRequest.StartAt = "0"; branchesRequest.Size = "1000"; branchesRequest.SortBy = "recordId"; ListResponse <Model.Company.Structure.Position> resp = _companyStructureService.ChildGetAll <Model.Company.Structure.Position>(branchesRequest); if (!resp.Success) { Common.errorMessage(resp); } positionStore.DataSource = resp.Items; positionStore.DataBind(); }
protected void Unnamed_Event(object sender, DirectEventArgs e) { PositionListRequest req = new PositionListRequest(); req.StartAt = "0"; req.Size = "1000"; req.SortBy = "positionRef"; ListResponse <Model.Company.Structure.Position> resp = _branchService.ChildGetAll <Model.Company.Structure.Position>(req); if (!resp.Success) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(resp); return; } JobPositions p = new JobPositions(); p.DataSource = resp.Items; p.Parameters["User"].Value = _systemService.SessionHelper.GetCurrentUser(); p.RightToLeft = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No; p.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No; string format = "pdf"; string fileName = String.Format("Report.{0}", format); MemoryStream ms = new MemoryStream(); p.ExportToPdf(ms); Response.Clear(); Response.ContentType = "application/pdf"; Response.AddHeader("Content-Disposition", String.Format("{0}; filename={1}", "inline", fileName)); Response.Headers.Add("X-Content-Type-Options", "nosniff"); Response.BinaryWrite(ms.ToArray()); Response.Flush(); Response.Close(); }
private JobPositions GetReport() { PositionListRequest req = new PositionListRequest(); req.StartAt = "0"; req.Size = "1000"; req.SortBy = "positionRef"; ListResponse <Model.Company.Structure.Position> resp = _branchService.ChildGetAll <Model.Company.Structure.Position>(req); if (!resp.Success) { X.MessageBox.ButtonText.Ok = Resources.Common.Ok; Common.errorMessage(resp); return(null); } JobPositions p = new JobPositions(); p.DataSource = resp.Items; p.Parameters["User"].Value = _systemService.SessionHelper.GetCurrentUser(); p.RightToLeft = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeft.Yes : DevExpress.XtraReports.UI.RightToLeft.No; p.RightToLeftLayout = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.XtraReports.UI.RightToLeftLayout.Yes : DevExpress.XtraReports.UI.RightToLeftLayout.No; return(p); }