public void UCViewSedimentedLoadCapacitorLoads(Int64 YourTransportCompanyId) { try { var Lst = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetSedimentedLoadCapacitorLoads(YourTransportCompanyId); UCViewInformation(Lst); } catch (Exception ex) { throw new Exception(MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "/n/r" + ex.Message); } }
private void UCLoadCapacitorLoadSelectedEvent(object Sender, nEstelamIdEventArgs e) { try { UCLoadCapacitorLoadManipulation.UCViewInformation(R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNSSLoadCapacitorLoad(e.nEstelamId)); UCLoadCapacitorLoadLoadPermissionsIssued.UCViewInformation(e.nEstelamId); } catch (Exception ex) { Response.Write("<script>alert('" + ex.Message + "')</script>"); } }
protected void BtnRegistering_Click(object sender, EventArgs e) { try { R2CoreTransportationAndLoadNotificationStandardLoadCapacitorLoadStructure NSS = UCGetInformation(true); if (NSS.nEstelamId != 0) { R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManipulationManagement.LoadCapacitorLoadEditing(NSS); } else { long mynEstelamId = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManipulationManagement.LoadCapacitorLoadRegistering(NSS); UCViewInformation(R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNSSLoadCapacitorLoad(mynEstelamId)); } UCInformationChangedEvent?.Invoke(this, new EventArgs()); } catch (Exception ex) { Response.Write("<script>alert('" + ex.Message + "')</script>"); } }
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); } DropDownListLoads.Items.Clear(); DropDownListLoads.Items.Add("انتخاب کنید ..."); for (int Loopx = 0; Loopx <= Lst.Count - 1; Loopx++) { string Item = Lst[Loopx].nEstelamId + " # " + Lst[Loopx].GoodTitle + " " + Lst[Loopx].LoadTargetTitle; DropDownListLoads.Items.Add(Item); } } catch (PleaseReloginException ex) { Response.Redirect("/LoginManagement/Wflogin.aspx"); } 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 void UCViewNSSLoadCapacitorLoad(Int64 YournEstelamId) { try { UCClearInformation(); var NSS = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNSSLoadCapacitorLoad(YournEstelamId); LblnEstelamId.Text = NSS.nEstelamId.ToString(); LbldDateTimeElam.Text = NSS.dDateElam + " - " + NSS.dTimeElam; LblnCarNumKol.Text = NSS.nCarNumKol.ToString(); LblGoodTitle.Text = NSS.GoodTitle; LblLoadTargetTitle.Text = NSS.LoadTargetTitle; LblLoaderTypeTitle.Text = NSS.LoaderTypeTitle; LblTarrifPrice.Text = NSS.StrPriceSug.ToString(); LblStrDescription.Text = NSS.StrDescription; LblStrAddress.Text = NSS.StrAddress; LblStrBarName.Text = NSS.StrBarName; } catch (Exception ex) { throw new Exception(MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "/n/r" + ex.Message); } }
private void BtnLoadRegistering_Click(object sender, EventArgs e) { try { R2CoreTransportationAndLoadNotificationStandardLoadCapacitorLoadStructure NSS = WcGetNSS(true); var InstanceLoadCapacitorLoadManipulation = new R2CoreTransportationAndLoadNotificationInstanceLoadCapacitorLoadManipulationManager(); long mynEstelamId = InstanceLoadCapacitorLoadManipulation.LoadCapacitorLoadRegistering(NSS); WcViewInformation(R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNSSLoadCapacitorLoad(mynEstelamId)); WcInformationChangedEvent?.Invoke(this, new EventArgs()); Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('2','" + "بار با موفقیت به ثبت رسید" + "');", true); } catch (PleaseReloginException ex) { Response.Redirect("/LoginManagement/Wflogin.aspx"); } catch (Exception ex) when(ex is LoadCapacitorLoadRegisteringNotAllowedforThisAnnouncementHallSubGroupException || ex is LoadCapacitorLoadNumberOverLimitException || ex is LoadCapacitorLoadnCarNumKolCanNotBeZeroException || ex is TransportCompanyISNotActiveException || ex is LoadCapacitorLoadRegisterTimePassedException || ex is LoadCapacitorLoadEditTimePassedException) { Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('1','" + ex.Message + "');", true); } catch (DataEntryException ex) { Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('1','" + ex.Message + "');", true); } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('1','" + MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "\\n " + ex.Message + "');", true); } }
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); } }
private void BtnLoadCancelling_Click(object sender, EventArgs e) { try { var InstanceLogin = new ATISWebMClassLoginManager(); var InstanceLoadCapacitorLoadManipulation = new R2CoreTransportationAndLoadNotificationInstanceLoadCapacitorLoadManipulationManager(); R2CoreTransportationAndLoadNotificationStandardLoadCapacitorLoadStructure NSSTemp = WcGetNSS(false); R2CoreTransportationAndLoadNotificationStandardLoadCapacitorLoadStructure NSS = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNSSLoadCapacitorLoad(NSSTemp.nEstelamId); if (NSS.nEstelamId != 0) { InstanceLoadCapacitorLoadManipulation.LoadCapacitorLoadCancelling(NSS, InstanceLogin.GetNSSCurrentUser()); WcRefreshInformation(); WcInformationChangedEvent?.Invoke(this, new EventArgs()); Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('2','" + "بار با موفقیت کنسل شد" + "');", true); } } catch (PleaseReloginException ex) { Response.Redirect("/LoginManagement/Wflogin.aspx"); } catch (LoadCapacitorLoadCancelTimeNotReachedException ex) { Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('1','" + ex.Message + "');", true); } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('1','" + MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "\\n" + ex.Message + "');", true); } }
private void WcLoadCapacitorLoadsCollectionSummaryIntelligently_WcLoadCapacitorLoadSelectedEvent(object sender, WcLoadCapacitorLoadsCollectionSummaryIntelligently.nEstelamIdEventArgs e) { try { R2CoreTransportationAndLoadNotificationStandardLoadCapacitorLoadExtendedStructure NSS = R2CoreTransportationAndLoadNotificationMClassLoadCapacitorLoadManagement.GetNSSLoadCapacitorLoad(e.nEstelamId); WcViewInformation(NSS); } catch (Exception ex) { Page.ClientScript.RegisterStartupScript(GetType(), "WcViewAlert", "WcViewAlert('1','" + MethodBase.GetCurrentMethod().ReflectedType.FullName + "." + MethodBase.GetCurrentMethod().Name + "." + ex.Message + "');", true); } }