public Order_Model_for_Tile GetOrderForTile(string connectionString, string sessionTicket, out TransactionalInformation transaction) { var method = MethodInfo.GetCurrentMethod(); //var ipInfo = Util.GetIPInfo(HttpContext.Current.Request); transaction = new TransactionalInformation(); Order_Model_for_Tile modelorder = new Order_Model_for_Tile(); var userSecurityTicket = VerifySessionToken(sessionTicket); try { var order_data = cls_Get_All_MO1_Orders.Invoke(connectionString, userSecurityTicket).Result; if (order_data != null) { modelorder.date_for_tile = order_data.date_for_tile == DateTime.MinValue ? "-" : order_data.date_for_tile.ToString("dd.MM.yyyy"); modelorder.number_of_tiles = order_data.number_of_tiles; } } catch (Exception ex) { Logger.LogInfo(new LogEntry(null, null, connectionString, method, userSecurityTicket, ex)); transaction.ReturnMessage = new List <string>(); string errorMessage = ex.Message; transaction.ReturnStatus = false; transaction.ReturnMessage.Add(errorMessage); transaction.IsAuthenicated = true; transaction.IsException = true; } return(modelorder); }
public Order_Model_for_Tile GetAllOrderForTile(string connectionString, string sessionTicket, out TransactionalInformation transaction) { var method = MethodInfo.GetCurrentMethod(); transaction = new TransactionalInformation(); Order_Model_for_Tile modelorder = new Order_Model_for_Tile(); var userSecurityTicket = VerifySessionToken(sessionTicket); try { var order_data = cls_Get_Number_of_Orders_for_Complete_Report.Invoke(connectionString, userSecurityTicket).Result; if (order_data != null) { modelorder.number_of_tiles = order_data.number_of_tiles; } } catch (Exception ex) { Logger.LogInfo(new LogEntry(null, null, connectionString, method, userSecurityTicket, ex)); transaction.ReturnMessage = new List <string>(); string errorMessage = ex.Message; transaction.ReturnStatus = false; transaction.ReturnMessage.Add(errorMessage); transaction.IsAuthenicated = true; transaction.IsException = true; } return(modelorder); }
public HttpResponseMessage getOrderForTile() { TransactionalInformation transaction = new TransactionalInformation(); OrderForTileApiModel orderForTileApiModel = new OrderForTileApiModel(); Order_Model_for_Tile orderList = dashboardDataService.GetOrderForTile(connectionString, SessionToken, out transaction); orderForTileApiModel.orderForTile = orderList; if (transaction.ReturnStatus) { return(Request.CreateResponse <OrderForTileApiModel>(HttpStatusCode.OK, orderForTileApiModel)); } return(Request.CreateResponse <OrderForTileApiModel>(HttpStatusCode.BadRequest, orderForTileApiModel)); }