public void WcViewInformation(R2CoreTransportationAndLoadNotificationStandardLoadCapacitorLoadExtendedStructure YourNSS) { try { TxtnEstelamId.Text = YourNSS.nEstelamId.ToString(); TxtDateTimeofLoadRegistering.Text = YourNSS.dTimeElam + " - " + YourNSS.dDateElam; TxtLoadReciever.Text = YourNSS.StrBarName; TxtSearchTargetCity.Text = YourNSS.nCityCode + " # " + YourNSS.LoadTargetTitle.Trim(); TxtSearchLoad.Text = YourNSS.nBarCode + " # " + YourNSS.GoodTitle.Trim(); TxtSearchLoaderType.Text = YourNSS.nTruckType + " # " + YourNSS.LoaderTypeTitle.Trim(); TxtAddress.Text = YourNSS.StrAddress; TxtnCarNumKol.Text = YourNSS.nCarNumKol.ToString(); TxtTarrif.Text = R2CoreMClassPublicProcedures.ParseSignDigitToSignString(YourNSS.StrPriceSug); TxtDescription.Text = YourNSS.StrDescription; WcViewInformationCompleted?.Invoke(this, new EventArgs()); } catch (Exception ex) { throw new Exception(MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "." + ex.Message); } }
public void WcViewNSS(Int64 YournEstelamId) { try { var NSS = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNSSLoadCapacitorLoad(YournEstelamId); TxtnEstelamId.Text = NSS.nEstelamId.ToString(); LblDateTimeofLoadRegistering.Text = NSS.dDateElam + " - " + NSS.dTimeElam; LblLoadTitle.Text = NSS.GoodTitle; LblTargetCity.Text = NSS.LoadTargetTitle; LblLoaderType.Text = NSS.LoaderTypeTitle; LblnCarNumKol.Text = NSS.nCarNumKol.ToString(); LblnCarNum.Text = NSS.nCarNum.ToString(); LblTarrif.Text = R2CoreMClassPublicProcedures.ParseSignDigitToSignString(Convert.ToInt64(NSS.StrPriceSug.ToString())); LblDescription.Text = NSS.StrDescription; LblAddress.Text = NSS.StrAddress; LblLoadReceiver.Text = NSS.StrBarName; } catch (Exception ex) { throw new Exception(MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "." + ex.Message); } }
public HttpResponseMessage GetLoadCapacitorLoads() { ATISMobileWebApi WebAPi = new ATISMobileWebApi(); try { //تایید اعتبار کلاینت WebAPi.AuthenticateClientApikeyNonceWith4Parameter(Request, ATISMobileWebApiLogTypes.WebApiClientLoadsReviewRequest); var Content = JsonConvert.DeserializeObject <string>(Request.Content.ReadAsStringAsync().Result); var AHId = Content.Split(';')[2]; var AHSGId = Content.Split(';')[3]; var ProvinceId = Content.Split(';')[4]; var ListType = Content.Split(';')[5]; var InstanceLoadCapacitorLoad = new R2CoreTransportationAndLoadNotificationInstanceLoadCapacitorLoadManager(); Int64 ListTypeConv = Convert.ToInt64(ListType) == (long)LoadCapacitorLoadsListType.NotSedimented ? Convert.ToInt64(AnnouncementHallAnnounceTimeTypes.AllOfLoadsWithoutSedimentedLoads) : Convert.ToInt64(AnnouncementHallAnnounceTimeTypes.SedimentedLoads); var Lst = InstanceLoadCapacitorLoad.GetLoadCapacitorLoadsfromSubscriptionDB(Convert.ToInt64(AHId), Convert.ToInt64(AHSGId), ListTypeConv, false, true, R2CoreTransportationAndLoadNotificationLoadCapacitorLoadOrderingOptions.TargetProvince, Int64.MinValue, Convert.ToInt64(ProvinceId)); List <Models.LoadCapacitorLoad> _Loads = new List <Models.LoadCapacitorLoad>(); for (int Loopx = 0; Loopx <= Lst.Count - 1; Loopx++) { var Item = new Models.LoadCapacitorLoad(); Item.LoadnEstelamId = "کد مرجع : " + Lst[Loopx].nEstelamId; Item.LoadCapacitorLoadTitleTargetCityTotalAmount = Lst[Loopx].GoodTitle.Trim() + " - " + Lst[Loopx].LoadTargetTitle.Trim() + " تعداد : " + Lst[Loopx].nCarNum.ToString().Trim(); Item.TransportCompanyTarrifPrice = Lst[Loopx].TransportCompanyTitle.Trim() + " تلفن: " + Lst[Loopx].TransportCompanyTel.Trim() + "\n نرخ پایه : " + R2CoreMClassPublicProcedures.R2MakeCamaYourDigit(Convert.ToUInt64(Lst[Loopx].StrPriceSug)); Item.Description = Lst[Loopx].StrDescription.Trim() + " " + Lst[Loopx].StrBarName.Trim() + " " + Lst[Loopx].StrAddress.Trim(); _Loads.Add(Item); } HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); response.Content = new StringContent(JsonConvert.SerializeObject(_Loads), Encoding.UTF8, "application/json"); return(response); } catch (UserNotExistByMobileNumberException ex) { return(WebAPi.CreateSuccessContentMessage(string.Empty)); } catch (Exception ex) { return(WebAPi.CreateErrorContentMessage(ex)); } }
public void WcViewInformation() { try { var InstanceLogin = new ATISWebMClassLoginManager(); var InstanceTransportCompanies = new R2CoreTransportationAndLoadNotificationInstanceTransportCompaniesManager(); var TCId = InstanceTransportCompanies.GetNSSTransportCompnay(InstanceLogin.GetNSSCurrentUser()).TCId; List <R2CoreTransportationAndLoadNotificationStandardLoadCapacitorLoadExtendedStructure> Lst = null; if (WcCurrentListType == LoadCapacitorLoadsListType.NotSedimented) { LblCaption.Text = "لیست بار موجود"; Lst = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNotSedimentedLoadCapacitorLoads(TCId); } else if (WcCurrentListType == LoadCapacitorLoadsListType.Sedimented) { LblCaption.Text = "لیست بار رسوب شده"; Lst = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetSedimentedLoadCapacitorLoads(TCId); } else if (WcCurrentListType == LoadCapacitorLoadsListType.TommorowLoad) { LblCaption.Text = "لیست بار فردا"; Lst = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetTommorowLoadCapacitorLoads(TCId); } else if (WcCurrentListType == LoadCapacitorLoadsListType.None) { LblCaption.Text = "لیست بار"; Lst = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetAllLoadCapacitorLoads(TCId); } while (TblLoadCapacitorLoads.Rows.Count > 1) { TblLoadCapacitorLoads.Rows.RemoveAt(1); } for (int Loopx = 0; Loopx <= Lst.Count - 1; Loopx++) { TableRow tempRow = new TableRow(); TableCell tempCell = null; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].StrAddress; tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].StrBarName; tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].StrDescription; tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = R2CoreMClassPublicProcedures.ParseSignDigitToSignString(Lst[Loopx].StrPriceSug); tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].nCarNum.ToString(); tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].nCarNumKol.ToString(); tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].LoaderTypeTitle; tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].LoadTargetTitle; tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].GoodTitle; tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].dDateElam + " - " + Lst[Loopx].dTimeElam; tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; tempCell = new TableCell(); tempCell.Text = Lst[Loopx].nEstelamId.ToString(); tempCell.CssClass = "R2FontBHomaSmall"; tempRow.Cells.Add(tempCell); tempCell.HorizontalAlign = HorizontalAlign.Center; TblLoadCapacitorLoads.Rows.Add(tempRow); } TableFooterRow tempFooterRow = new TableFooterRow(); tempFooterRow.BackColor = Color.LightBlue; tempFooterRow.BorderColor = Color.LightBlue; TblLoadCapacitorLoads.Rows.Add(tempFooterRow); } catch (PleaseReloginException ex) { Response.Redirect("/LoginManagement/Wflogin.aspx"); } catch (Exception ex) { throw new Exception(MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "." + ex.Message); } }