public static async Task <ReturnedSaveFuncInfo> SaveAsync(BuildingRequestRegionBussines cls) { var res = new ReturnedSaveFuncInfo(); try { var obj = new WebBuildingRequestRegion() { Guid = cls.Guid, Modified = cls.Modified, HardSerial = cls.HardSerial, RegionGuid = cls.RegionGuid, RequestGuid = cls.RequestGuid, ServerStatus = cls.ServerStatus, ServerDeliveryDate = cls.ServerDeliveryDate }; await obj.SaveAsync(); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); res.AddReturnedValue(ex); } return(res); }
public async Task SaveAsync() { try { var res = await Extentions.PostToApi <BuildingRequestBussines, WebBuildingRequest>(this, Url); if (res.ResponseStatus != ResponseStatus.Success) { var temp = new TempBussines() { ObjectGuid = Guid, Type = EnTemp.Requests }; await temp.SaveAsync(); return; } var bu = res.Data; if (bu == null) { return; } await TempBussines.UpdateEntityAsync(EnTemp.Requests, bu.Guid, ServerStatus.Delivered, DateTime.Now); await WebBuildingRequestRegion.SaveAsync(RegionList); } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }