هل يمكنك شرح هذا الجزء من الكلاس Class67 بالعربي وبالتفصيل    public static void smethod_101(object object_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) == 0)
    {
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
    }
    else
    {
      ReportViewer reportViewer = new ReportViewer(object_0.ToString());
      object_0 = (object) new DetailedPurchases();
      string str = Class67.smethod_99(object_0);
      if (System.IO.File.Exists(str))
        ((XtraReport) object_0).LoadLayout(str);
      object_0 = (object) Class67.loadReportsCommonProprties(object_0);
      List<purchases_item> list = ConnectionTools.OpenConn().purchases_item.Where<purchases_item>((Expression<System.Func<purchases_item, bool>>) (u => u.pmain_ID == (int?) int_0)).OrderBy<purchases_item, int?>((Expression<System.Func<purchases_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<purchases_item, string>((Expression<System.Func<purchases_item, string>>) (o => o.st_items.stitems_Name)).ToList<purchases_item>();
      int int_1_1 = list.FirstOrDefault<purchases_item>().purchases_main.vendor_ID.Value;
      DateTime dateTime = list.FirstOrDefault<purchases_item>().purchases_main.pmain_Date.Value;
      ((XtraReportBase) object_0).DataSource = (object) list;
      try
      {
        object_0 = (object) Class67.smethod_114((object) PathingVars.GeneralParentForm, (object) "", object_0, (object) "", "", int_1: int_1_1, nullable_0: new DateTime?(dateTime), string_8: SysSettings.salesInvoicesNotes, OperationAmount: list.FirstOrDefault<purchases_item>().purchases_main.pmain_NetValue.Value);
      }
      catch
      {
      }
      try
      {
        ((XtraReport) object_0).CreateDocument(true);
        reportViewer.documentViewer1.DocumentSource = object_0;
        reportViewer.Show();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_CREATE_REPORT_DOCMUENT, 0);
      }
    }
  }

  public static void smethod_102(object object_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) == 0)
    {
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
    }
    else
    {
      ReportViewer reportViewer = new ReportViewer(object_0.ToString());
      object_0 = (object) new DetailedSales_ThermCustom();
      ((XtraReport) object_0).PrintingSystem.StartPrint += new PrintDocumentEventHandler(Class67.zaXqTprGkOg);
      string str1 = Class67.smethod_99(object_0);
      if (System.IO.File.Exists(str1))
        ((XtraReport) object_0).LoadLayout(str1);
      mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
      List<sales_item> list1 = mrsalesdbEntities.sales_item.Where<sales_item>((Expression<System.Func<sales_item, bool>>) (u => u.smain_ID == (int?) int_0)).OrderBy<sales_item, int?>((Expression<System.Func<sales_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<sales_item, string>((Expression<System.Func<sales_item, string>>) (o => o.st_items.stitems_Name)).ToList<sales_item>();
      List<purchases_item_seriels> list2 = mrsalesdbEntities.purchases_item_seriels.Where<purchases_item_seriels>((Expression<System.Func<purchases_item_seriels, bool>>) (u => u.smain_ID == (int?) int_0)).ToList<purchases_item_seriels>();
      foreach (sales_item salesItem in list1)
      {
        sales_item sales_item_0 = salesItem;
        sales_item_0.serials = string.Join(",", (IEnumerable<string>) list2.Where<purchases_item_seriels>((System.Func<purchases_item_seriels, bool>) (u => u.sitem_ID.Value == sales_item_0.sitem_ID)).Select<purchases_item_seriels, string>((System.Func<purchases_item_seriels, string>) (s => s.pis_CustomSerial)).ToList<string>());
      }
      int num = list1.FirstOrDefault<sales_item>().sales_main.cust_ID.Value;
      DateTime dateTime = list1.FirstOrDefault<sales_item>().sales_main.smain_Date.Value;
      ((XtraReportBase) object_0).DataSource = (object) list1;
      string compName = list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_Name;
      string compTaxId = list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_TaxID;
      DateTime? smainDate = list1.FirstOrDefault<sales_item>().sales_main.smain_Date;
      DateTime dat = smainDate.Value;
      Decimal? nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_NetValue;
      Decimal vatTota = nullable.Value;
      nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_TaxValue;
      Decimal invTotal = nullable.Value;
      string qrocdeByCountry = QRCodeHandling.getQrocdeByCountry(compName, compTaxId, dat, vatTota, invTotal);
      object[] objArray = new object[9];
      objArray[0] = (object) list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_Name;
      objArray[1] = (object) " ";
      objArray[2] = (object) list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_TaxID;
      objArray[3] = (object) " ";
      smainDate = list1.FirstOrDefault<sales_item>().sales_main.smain_Date;
      objArray[4] = (object) smainDate.Value;
      objArray[5] = (object) " ";
      nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_NetValue;
      objArray[6] = (object) nullable.Value;
      objArray[7] = (object) " ";
      nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_TaxValue;
      objArray[8] = (object) nullable.Value;
      string str2 = string.Concat(objArray);
      try
      {
        HomeMain generalParentForm = PathingVars.GeneralParentForm;
        object object_2 = object_0;
        int int_0_1 = int_0;
        int int_1_1 = num;
        DateTime? nullable_0 = new DateTime?(dateTime);
        string salesInvoicesNotes = SysSettings.salesInvoicesNotes;
        string string_9 = qrocdeByCountry;
        string string_10 = str2;
        nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_NetValue;
        Decimal OperationAmount = nullable.Value;
        object_0 = (object) Class67.smethod_114((object) generalParentForm, (object) "", object_2, (object) "", "", string_5: "SALES", int_0: int_0_1, int_1: int_1_1, nullable_0: nullable_0, string_8: salesInvoicesNotes, string_9: string_9, string_10: string_10, OperationAmount: OperationAmount);
      }
      catch
      {
      }
      ((XtraReport) object_0).Parameters["SmainID"].Value = (object) int_0;
      try
      {
        ((XtraReport) object_0).CreateDocument(true);
        reportViewer.documentViewer1.DocumentSource = object_0;
        reportViewer.Show();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_CREATE_REPORT_DOCMUENT, 0);
      }
    }
  }

  public static XtraReport smethod_103(object object_0, object object_1, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    object_0 = (object) new DetailedSales_ThermCustom();
    string str = Class67.smethod_99(object_0);
    if (System.IO.File.Exists(str))
      ((XtraReport) object_0).LoadLayout(str);
    mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
    List<sales_item> list1 = mrsalesdbEntities.sales_item.Where<sales_item>((Expression<System.Func<sales_item, bool>>) (u => u.smain_ID == (int?) int_0)).OrderBy<sales_item, int?>((Expression<System.Func<sales_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<sales_item, string>((Expression<System.Func<sales_item, string>>) (o => o.st_items.stitems_Name)).ToList<sales_item>();
    List<purchases_item_seriels> list2 = mrsalesdbEntities.purchases_item_seriels.Where<purchases_item_seriels>((Expression<System.Func<purchases_item_seriels, bool>>) (u => u.smain_ID == (int?) int_0)).ToList<purchases_item_seriels>();
    foreach (sales_item salesItem in list1)
    {
      sales_item sales_item_0 = salesItem;
      sales_item_0.serials = string.Join(",", (IEnumerable<string>) list2.Where<purchases_item_seriels>((System.Func<purchases_item_seriels, bool>) (u => u.sitem_ID.Value == sales_item_0.sitem_ID)).Select<purchases_item_seriels, string>((System.Func<purchases_item_seriels, string>) (s => s.pis_CustomSerial)).ToList<string>());
    }
    int int_1_1 = list1.FirstOrDefault<sales_item>().sales_main.cust_ID.Value;
    DateTime dateTime = list1.FirstOrDefault<sales_item>().sales_main.smain_Date.Value;
    ((XtraReportBase) object_0).DataSource = (object) list1;
    try
    {
      object_0 = (object) Class67.smethod_114((object) PathingVars.GeneralParentForm, (object) "", object_0, (object) "", "", string_5: "SALES", int_0: int_0, int_1: int_1_1, nullable_0: new DateTime?(dateTime), string_8: SysSettings.salesInvoicesNotes, OperationAmount: list1.FirstOrDefault<sales_item>().sales_main.smain_NetValue.Value);
    }
    catch
    {
    }
    ((XtraReport) object_0).Parameters["SmainID"].Value = (object) int_0;
    return (XtraReport) object_0;
  }

  public static void smethod_104(object object_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) != 0)
    {
      "SERVER=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 1)) + ";Port=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 2)) + ";DATABASE=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 3)) + ";UID=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 4)) + ";PASSWORD=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 5)) + ";" + myconn.OPTION + ";charset=" + myconn.charset + ";";
      ReportViewer reportViewer = new ReportViewer(object_0.ToString());
      object dataSource = ((XtraReportBase) object_0).DataSource;
      string str = Class67.smethod_99(object_0);
      if (System.IO.File.Exists(str))
        ((XtraReport) object_0).LoadLayout(str);
      ((XtraReportBase) object_0).DataSource = dataSource;
      object_0 = (object) Class67.loadReportsCommonProprties(object_0);
      List<porders_item> list = ConnectionTools.OpenConn().porders_item.Where<porders_item>((Expression<System.Func<porders_item, bool>>) (u => u.pmain_ID == (int?) int_0)).OrderBy<porders_item, int?>((Expression<System.Func<porders_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<porders_item, string>((Expression<System.Func<porders_item, string>>) (o => o.st_items.stitems_Name)).ToList<porders_item>();
      ((XtraReportBase) object_0).DataSource = (object) list;
      Decimal num = 0M;
      try
      {
        int int_0_1 = list.FirstOrDefault<porders_item>().porders_main.vendor_ID.Value;
        Decimal? nullable = Class67.smethod_14(int_0_1).balance;
        num = nullable.Value;
        DateTime dateTime = list.FirstOrDefault<porders_item>().porders_main.pordersm_Date.Value;
        try
        {
          HomeMain generalParentForm = PathingVars.GeneralParentForm;
          object object_2 = object_0;
          int int_1_1 = int_0_1;
          DateTime? nullable_0 = new DateTime?(dateTime);
          string salesInvoicesNotes = SysSettings.salesInvoicesNotes;
          nullable = list.FirstOrDefault<porders_item>().porders_main.pmain_NetValue;
          Decimal OperationAmount = nullable.Value;
          object_0 = (object) Class67.smethod_114((object) generalParentForm, (object) "", object_2, (object) "", "", int_1: int_1_1, nullable_0: nullable_0, string_8: salesInvoicesNotes, OperationAmount: OperationAmount);
        }
        catch
        {
        }
      }
      catch
      {
      }
      try
      {
        ((XtraReport) object_0).CreateDocument(true);
        reportViewer.documentViewer1.DocumentSource = object_0;
        reportViewer.Show();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_CREATE_REPORT_DOCMUENT, 0);
      }
    }
    else
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
  }

  public static void smethod_105(object object_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) != 0)
    {
      ReportViewer reportViewer = new ReportViewer(object_0.ToString());
      object_0 = (object) new DetailedSales_ThermCustom();
      string str = Class67.smethod_99(object_0);
      if (System.IO.File.Exists(str))
        ((XtraReport) object_0).LoadLayout(str);
      List<sales_sreturned_main> list = ConnectionTools.OpenConn().sales_sreturned_main.Where<sales_sreturned_main>((Expression<System.Func<sales_sreturned_main, bool>>) (u => u.sretmain_ID == int_0)).ToList<sales_sreturned_main>();
      int int_1_1 = list.FirstOrDefault<sales_sreturned_main>().sales_main.cust_ID.Value;
      DateTime dateTime = list.FirstOrDefault<sales_sreturned_main>().sales_main.smain_Date.Value;
      ((XtraReportBase) object_0).DataSource = (object) list;
      try
      {
        object_0 = (object) Class67.smethod_114((object) PathingVars.GeneralParentForm, (object) "", object_0, (object) "", "", int_1: int_1_1, nullable_0: new DateTime?(dateTime), string_8: SysSettings.salesInvoicesNotes, OperationAmount: list.FirstOrDefault<sales_sreturned_main>().sales_main.smain_NetValue.Value);
      }
      catch
      {
      }
      ((XtraReport) object_0).Parameters["SmainID"].Value = (object) int_0;
      try
      {
        ((XtraReport) object_0).CreateDocument(true);
        reportViewer.documentViewer1.DocumentSource = object_0;
        reportViewer.Show();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_CREATE_REPORT_DOCMUENT, 0);
      }
    }
    else
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
  }

  public static void smethod_106(IReport ireport_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) != 0)
    {
      ReportViewer reportViewer = new ReportViewer(ireport_0.ToString());
      try
      {
        ireport_0 = (IReport) Class67.smethod_114((object) PathingVars.GeneralParentForm, (object) "", (object) ireport_0, (object) "", "", string_8: SysSettings.salesInvoicesNotes);
      }
      catch
      {
      }
      ReportPrintTool reportPrintTool = new ReportPrintTool(ireport_0);
      try
      {
        if ((!SysSettings.OverrideReportPrinterSetting ? 0 : (SysSettings.DeafultReportPrinter != "" ? 1 : 0)) != 0)
          reportPrintTool.PrinterSettings.PrinterName = SysSettings.DeafultReportPrinter;
        reportPrintTool.Print();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_PRINT_REPORT_CHECK_THE_CONNECTION_OR_PRINTER_SETTING, 0);
      }
    }
    else
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
  }

  public static void smethod_107(object object_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) == 0)
    {
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
    }
    else
    {
      "SERVER=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 1)) + ";Port=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 2)) + ";DATABASE=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 3)) + ";UID=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 4)) + ";PASSWORD=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 5)) + ";" + myconn.OPTION + ";charset=" + myconn.charset + ";";
      object dataSource = ((XtraReportBase) object_0).DataSource;
      string str = Class67.smethod_99(object_0);
      if (System.IO.File.Exists(str))
        ((XtraReport) object_0).LoadLayout(str);
      ((XtraReportBase) object_0).DataSource = dataSource;
      object_0 = (object) Class67.loadReportsCommonProprties(object_0);
      mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
      try
      {
        List<porders_item> list = mrsalesdbEntities.porders_item.Where<porders_item>((Expression<System.Func<porders_item, bool>>) (u => u.pmain_ID == (int?) int_0)).OrderBy<porders_item, int?>((Expression<System.Func<porders_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<porders_item, string>((Expression<System.Func<porders_item, string>>) (o => o.st_items.stitems_Name)).ToList<porders_item>();
        ((XtraReportBase) object_0).DataSource = (object) list;
        try
        {
          int num1 = list.FirstOrDefault<porders_item>().porders_main.vendor_ID.Value;
          DateTime dateTime = list.FirstOrDefault<porders_item>().porders_main.pordersm_Date.Value;
          Decimal num2 = Class67.smethod_14(num1).balance.Value;
          try
          {
            object_0 = (object) Class67.smethod_114((object) PathingVars.GeneralParentForm, (object) "", object_0, (object) "", "", int_1: num1, nullable_0: new DateTime?(dateTime), string_8: SysSettings.salesInvoicesNotes);
          }
          catch
          {
          }
        }
        catch
        {
        }
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CANNOT_GET_THE_DATA_PLEASE_CHECK_THE_CONNECTION, 0);
      }
      ((XtraReport) object_0).Parameters["SmainID"].Value = (object) int_0;
      ReportPrintTool reportPrintTool = new ReportPrintTool((IReport) object_0);
      if ((!SysSettings.OverrideReportPrinterSetting ? 0 : (SysSettings.DeafultReportPrinter != "" ? 1 : 0)) != 0)
        reportPrintTool.PrinterSettings.PrinterName = SysSettings.DeafultReportPrinter;
      try
      {
        reportPrintTool.Print();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_PRINT_REPORT_CHECK_THE_CONNECTION_OR_PRINTER_SETTING, 0);
      }
    }
  }

  public static void smethod_108(object object_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) != 0)
    {
      object_0 = (object) new DetailedSales_ThermCustom();
      string str = Class67.smethod_99(object_0);
      if (System.IO.File.Exists(str))
        ((XtraReport) object_0).LoadLayout(str);
      mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
      List<sales_item> list1 = mrsalesdbEntities.sales_item.Where<sales_item>((Expression<System.Func<sales_item, bool>>) (u => u.smain_ID == (int?) int_0)).OrderBy<sales_item, int?>((Expression<System.Func<sales_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<sales_item, string>((Expression<System.Func<sales_item, string>>) (o => o.st_items.stitems_Name)).ToList<sales_item>();
      List<purchases_item_seriels> list2 = mrsalesdbEntities.purchases_item_seriels.Where<purchases_item_seriels>((Expression<System.Func<purchases_item_seriels, bool>>) (u => u.smain_ID == (int?) int_0)).ToList<purchases_item_seriels>();
      foreach (sales_item salesItem in list1)
      {
        sales_item sales_item_0 = salesItem;
        sales_item_0.serials = string.Join(",", (IEnumerable<string>) list2.Where<purchases_item_seriels>((System.Func<purchases_item_seriels, bool>) (u => u.sitem_ID.Value == sales_item_0.sitem_ID)).Select<purchases_item_seriels, string>((System.Func<purchases_item_seriels, string>) (s => s.pis_CustomSerial)).ToList<string>());
      }
      int int_1_1 = list1.FirstOrDefault<sales_item>().sales_main.cust_ID.Value;
      DateTime dateTime = list1.FirstOrDefault<sales_item>().sales_main.smain_Date.Value;
      try
      {
        ((XtraReportBase) object_0).DataSource = (object) list1;
        string compName = list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_Name;
        string compTaxId = list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_TaxID;
        DateTime? smainDate = list1.FirstOrDefault<sales_item>().sales_main.smain_Date;
        DateTime dat = smainDate.Value;
        Decimal? nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_NetValue;
        Decimal vatTota = nullable.Value;
        nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_TaxValue;
        Decimal invTotal = nullable.Value;
        string qrocdeByCountry = QRCodeHandling.getQrocdeByCountry(compName, compTaxId, dat, vatTota, invTotal);
        object[] objArray = new object[9];
        objArray[0] = (object) list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_Name;
        objArray[1] = (object) " ";
        objArray[2] = (object) list1.FirstOrDefault<sales_item>().sales_main.ad_branches.ad_company_data.comp_TaxID;
        objArray[3] = (object) " ";
        smainDate = list1.FirstOrDefault<sales_item>().sales_main.smain_Date;
        objArray[4] = (object) smainDate.Value;
        objArray[5] = (object) " ";
        nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_NetValue;
        objArray[6] = (object) nullable.Value;
        objArray[7] = (object) " ";
        nullable = list1.FirstOrDefault<sales_item>().sales_main.smain_TaxValue;
        objArray[8] = (object) nullable.Value;
        string string_10 = string.Concat(objArray);
        try
        {
          object_0 = (object) Class67.smethod_114((object) PathingVars.GeneralParentForm, (object) "", object_0, (object) "", "", string_5: "SALES", int_0: int_0, int_1: int_1_1, nullable_0: new DateTime?(dateTime), string_8: SysSettings.salesInvoicesNotes, string_9: qrocdeByCountry, string_10: string_10);
        }
        catch
        {
        }
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CANNOT_GET_THE_DATA_PLEASE_CHECK_THE_CONNECTION, 0);
      }
      ((XtraReport) object_0).Parameters["SmainID"].Value = (object) int_0;
      ((XtraReport) object_0).PrintingSystem.StartPrint += new PrintDocumentEventHandler(Class67.zaXqTprGkOg);
      ReportPrintTool reportPrintTool = new ReportPrintTool((IReport) object_0);
      try
      {
        if ((!SysSettings.OverrideReportPrinterSetting ? 0 : (SysSettings.DeafultReportPrinter != "" ? 1 : 0)) != 0)
          reportPrintTool.PrinterSettings.PrinterName = SysSettings.DeafultReportPrinter;
        reportPrintTool.Print();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_PRINT_REPORT_CHECK_THE_CONNECTION_OR_PRINTER_SETTING, 0);
      }
    }
    else
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
  }

  private static void zaXqTprGkOg(object sender, PrintDocumentEventArgs e)
  {
    e.PrintDocument.PrinterSettings.Copies = (short) Settings.Default.SalesInvoicesPrintedCopies;
  }

  public static void smethod_109(object object_0, string string_0, int int_0, int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    if (Class67.smethod_28(int_1, string_0) != 0)
    {
      object_0 = (object) new DetailedPurchases();
      List<purchases_item> list = ConnectionTools.OpenConn().purchases_item.Where<purchases_item>((Expression<System.Func<purchases_item, bool>>) (u => u.pmain_ID == (int?) int_0)).OrderBy<purchases_item, int?>((Expression<System.Func<purchases_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<purchases_item, string>((Expression<System.Func<purchases_item, string>>) (o => o.st_items.stitems_Name)).ToList<purchases_item>();
      ((XtraReportBase) object_0).DataSource = (object) list;
      int int_1_1 = list.FirstOrDefault<purchases_item>().purchases_main.vendor_ID.Value;
      DateTime dateTime = list.FirstOrDefault<purchases_item>().purchases_main.pmain_Date.Value;
      try
      {
        try
        {
          object_0 = (object) Class67.smethod_114((object) PathingVars.GeneralParentForm, (object) "", object_0, (object) "", "", int_1: int_1_1, nullable_0: new DateTime?(dateTime), string_8: SysSettings.salesInvoicesNotes, OperationAmount: list.FirstOrDefault<purchases_item>().purchases_main.pmain_NetValue.Value);
        }
        catch
        {
        }
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CANNOT_GET_THE_DATA_PLEASE_CHECK_THE_CONNECTION, 0);
      }
      ReportPrintTool reportPrintTool = new ReportPrintTool((IReport) object_0);
      try
      {
        if ((!SysSettings.OverrideReportPrinterSetting ? 0 : (SysSettings.DeafultReportPrinter != "" ? 1 : 0)) != 0)
          reportPrintTool.PrinterSettings.PrinterName = SysSettings.DeafultReportPrinter;
        reportPrintTool.Print();
      }
      catch
      {
        Class88.Show(strings.ERROR, strings.CAN_NOT_PRINT_REPORT_CHECK_THE_CONNECTION_OR_PRINTER_SETTING, 0);
      }
    }
    else
      Class88.Show(strings.ACCESS_DENIED, strings.YOU_DO_NOT_HAVE_PERMISSIONS_TO_EXECUTE_THIS_OPERATION, 0);
  }

  public static XtraReport qfxqTihEkAv(
    int int_0,
    string string_0 = "SALES",
    XtraReport xtraReport_0 = null,
    int int_1 = 4)
  {
    ConnectionTools.ReadConnPara();
    "SERVER=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 1)) + ";Port=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 2)) + ";DATABASE=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 3)) + ";UID=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 4)) + ";PASSWORD=" + Class67.smethod_59(Class67.smethod_122(FoldersPaths.ConnFilePath, 5)) + ";" + myconn.OPTION + ";charset=" + myconn.charset + ";";
    xtraReport_0 = (XtraReport) new StockOrder();
    string str = Class67.smethod_99((object) xtraReport_0);
    if (System.IO.File.Exists(str))
      xtraReport_0.LoadLayout(str);
    List<sales_item> list = ConnectionTools.OpenConn().sales_item.Where<sales_item>((Expression<System.Func<sales_item, bool>>) (u => u.smain_ID == (int?) int_0)).OrderBy<sales_item, int?>((Expression<System.Func<sales_item, int?>>) (o => o.st_items.stitems_Type)).ThenBy<sales_item, string>((Expression<System.Func<sales_item, string>>) (o => o.st_items.stitems_Name)).ToList<sales_item>();
    xtraReport_0.DataSource = (object) list;
    try
    {
      int num = list.FirstOrDefault<sales_item>().sales_main.cust_ID.Value;
      if (SysSettings.showsalesNote)
      {
        xtraReport_0.Parameters["Invoicenotes"].Value = (object) SysSettings.salesInvoicesNotes;
        xtraReport_0.Parameters["Invoicenotes"].Visible = true;
      }
      else
        xtraReport_0.Parameters["Invoicenotes"].Visible = false;
    }
    catch
    {
    }
    SqlDataSource dataSource = xtraReport_0.DataSource as SqlDataSource;
    xtraReport_0 = Class67.loadReportsCommonProprties((object) xtraReport_0);
    xtraReport_0.Parameters["mobile1"].Value = (object) BasicVars.BrMobile1;
    xtraReport_0.Parameters["mobile2"].Value = (object) BasicVars.BrMobile2;
    xtraReport_0.Parameters["mobile3"].Value = (object) BasicVars.BrMobile3;
    xtraReport_0.Parameters["country"].Value = (object) BasicVars.BrCountry;
    xtraReport_0.Parameters["city"].Value = (object) BasicVars.BrCity;
    xtraReport_0.Parameters["address"].Value = (object) BasicVars.BrAdrress;
    xtraReport_0.Parameters["email"].Value = (object) BasicVars.Email;
    xtraReport_0.Parameters["website"].Value = (object) BasicVars.Website;
    xtraReport_0.Parameters["CompanyName"].Value = (object) BasicVars.CompanyName;
    try
    {
      xtraReport_0.FindControl("xrLabel20", true).Text = CopyRightsClass.CopyRight;
      xtraReport_0.FindControl("xrLabel3", true).Text = CopyRightsClass.website;
    }
    catch
    {
    }
    xtraReport_0.Parameters["SmainID"].Value = (object) int_0;
    xtraReport_0.PrinterName = SysSettings.DeafultReportPrinter;
    return xtraReport_0;
  }

  public static XtraReport smethod_110(Operations operations_0, int int_0)
  {
    XtraReport xtraReport = new XtraReport();
    mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
    switch (operations_0)
    {
      case Operations.PAYMENT:
        bonds_payment bondsPayment = mrsalesdbEntities.bonds_payment.Find(new object[1]
        {
          (object) int_0
        });
        List<bonds_payment> bondsPaymentList = new List<bonds_payment>();
        bondsPaymentList.Add(bondsPayment);
        xtraReport = (XtraReport) new PaymentDet();
        xtraReport.DataSource = (object) bondsPaymentList;
        break;
      case Operations.RECEIVE:
        bonds_receive bondsReceive = mrsalesdbEntities.bonds_receive.Find(new object[1]
        {
          (object) int_0
        });
        List<bonds_receive> bondsReceiveList = new List<bonds_receive>();
        bondsReceiveList.Add(bondsReceive);
        xtraReport = (XtraReport) new ReceivedDet();
        xtraReport.DataSource = (object) bondsReceiveList;
        break;
      case Operations.EXPENSES:
        bonds_expenses bondsExpenses = mrsalesdbEntities.bonds_expenses.Find(new object[1]
        {
          (object) int_0
        });
        List<bonds_expenses> bondsExpensesList = new List<bonds_expenses>();
        bondsExpensesList.Add(bondsExpenses);
        xtraReport = (XtraReport) new ExpensDet();
        xtraReport.DataSource = (object) bondsExpensesList;
        break;
      case Operations.REVENUES:
        bonds_revenues bondsRevenues = mrsalesdbEntities.bonds_revenues.Find(new object[1]
        {
          (object) int_0
        });
        List<bonds_revenues> bondsRevenuesList = new List<bonds_revenues>();
        bondsRevenuesList.Add(bondsRevenues);
        xtraReport = (XtraReport) new RevenuDet();
        xtraReport.DataSource = (object) bondsRevenuesList;
        break;
      case Operations.RETURNED_PURCHASES:
        List<purchaese_preturned_items> list1 = mrsalesdbEntities.purchaese_preturned_items.Where<purchaese_preturned_items>((Expression<System.Func<purchaese_preturned_items, bool>>) (u => u.pretmain_ID == (int?) int_0)).ToList<purchaese_preturned_items>();
        List<purchaese_preturned_items> purchaesePreturnedItemsList = new List<purchaese_preturned_items>();
        purchaesePreturnedItemsList.AddRange((IEnumerable<purchaese_preturned_items>) list1);
        xtraReport = (XtraReport) new ReturnedPurchases();
        xtraReport.DataSource = (object) purchaesePreturnedItemsList;
        break;
      case Operations.RETURNED_SALES:
        List<sales_sreturned_items> list2 = mrsalesdbEntities.sales_sreturned_items.Where<sales_sreturned_items>((Expression<System.Func<sales_sreturned_items, bool>>) (u => u.sretmain_ID == (int?) int_0)).ToList<sales_sreturned_items>();
        List<sales_sreturned_items> salesSreturnedItemsList1 = new List<sales_sreturned_items>();
        salesSreturnedItemsList1.AddRange((IEnumerable<sales_sreturned_items>) list2);
        xtraReport = (XtraReport) new ReturnedSales();
        xtraReport.DataSource = (object) salesSreturnedItemsList1;
        break;
      case Operations.CREDIT_NOTE:
        List<sales_sreturned_items> list3 = mrsalesdbEntities.sales_sreturned_items.Where<sales_sreturned_items>((Expression<System.Func<sales_sreturned_items, bool>>) (u => u.sretmain_ID == (int?) int_0)).ToList<sales_sreturned_items>();
        List<sales_sreturned_items> salesSreturnedItemsList2 = new List<sales_sreturned_items>();
        salesSreturnedItemsList2.AddRange((IEnumerable<sales_sreturned_items>) list3);
        xtraReport = (XtraReport) new CreditNote();
        xtraReport.DataSource = (object) salesSreturnedItemsList2;
        break;
    }
    return xtraReport;
  }