هل يمكنك شرح الكلاس التالي    using MrSales;
using MrSales.MrSControls;
using MrSales.MrSLanguages;
using MrSales.MrSModels;
using MrSales.MrSModels.dataObjects;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;


internal class Class72
{
  public static List<CLS_1SimpleIDName> smethod_0()
  {
    List<CLS_1SimpleIDName> cls1SimpleIdNameList = new List<CLS_1SimpleIDName>();
    cls1SimpleIdNameList.Clear();
    string[] strArray = new string[7]
    {
      strings.Saturday,
      strings.Sunday,
      strings.Monday,
      strings.Tuesday,
      strings.Wednesday,
      strings.Thursday,
      strings.Friday
    };
    int num = 1;
    foreach (string str in strArray)
    {
      cls1SimpleIdNameList.Add(new CLS_1SimpleIDName()
      {
        ID = num,
        Name = str
      });
      ++num;
    }
    return cls1SimpleIdNameList;
  }

  public static List<CLS_1SimpleIDName> smethod_1()
  {
    List<CLS_1SimpleIDName> cls1SimpleIdNameList = new List<CLS_1SimpleIDName>();
    cls1SimpleIdNameList.Clear();
    string[] strArray = new string[6]
    {
      strings.Attract_attention,
      strings.Written_Warning,
      strings.Days_Deduction,
      strings.Money_Deduction,
      strings.Reverance_with_Reward,
      strings.Reverance_without_Reward
    };
    int num = 0;
    foreach (string str in strArray)
    {
      cls1SimpleIdNameList.Add(new CLS_1SimpleIDName()
      {
        ID = num,
        Name = str
      });
      ++num;
    }
    return cls1SimpleIdNameList;
  }

  public static List<CLS_1SimpleIDName> smethod_2()
  {
    List<CLS_1SimpleIDName> cls1SimpleIdNameList = new List<CLS_1SimpleIDName>();
    cls1SimpleIdNameList.Clear();
    string[] strArray = new string[5]
    {
      strings.Appreciation_Certificate,
      strings.leave_without_pay,
      strings.Financial_rewards,
      strings.paid_leave,
      strings.Special_promotions
    };
    int num = 0;
    foreach (string str in strArray)
    {
      cls1SimpleIdNameList.Add(new CLS_1SimpleIDName()
      {
        ID = num,
        Name = str
      });
      ++num;
    }
    return cls1SimpleIdNameList;
  }

  public static int smethod_3(
    int int_0,
    string string_0,
    int int_1,
    string string_1,
    DateTime dateTime_0,
    DateTime dateTime_1,
    DateTime dateTime_2,
    int int_2)
  {
    mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
    emp_career_event entity = new emp_career_event();
    entity.op_ID = int_0;
    entity.type = string_0;
    entity.emp_ID = int_1;
    entity.desc = string_1;
    entity.from = new DateTime?(dateTime_0);
    entity.to = new DateTime?(dateTime_1);
    entity.record_date = new DateTime?(dateTime_2);
    entity.manager_ID = new int?(int_2);
    entity.r_user_ID = BasicVars.UserID;
    entity.r_branche_ID = BasicVars.Branche;
    entity.r_device_ID = BasicVars.Device;
    entity.r_shift_ID = BasicVars.Shift;
    mrsalesdbEntities.emp_career_event.Add(entity);
    mrsalesdbEntities.SaveChanges();
    return entity.id;
  }

  public static Decimal smethod_4(int int_0)
  {
    mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
    int int_0_1 = mrsalesdbEntities.emp_data.Find(new object[1]
    {
      (object) int_0
    }).emp_salerygroup.empsg_ID;
    ParameterExpression parameterExpression;
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    List<CLS_Emp_SalaryParts> list = mrsalesdbEntities.emp_saleryparts.Where<emp_saleryparts>((Expression<Func<emp_saleryparts, bool>>) (u => u.empsg_ID == (int?) int_0_1)).Select<emp_saleryparts, CLS_Emp_SalaryParts>(Expression.Lambda<Func<emp_saleryparts, CLS_Emp_SalaryParts>>((Expression) Expression.MemberInit(Expression.New(typeof (CLS_Emp_SalaryParts)), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (CLS_Emp_SalaryParts.set_empsp_Group)), )))); // Unable to render the statement
    return (HROptions.defaultDay_byBasicOrTotal ? (list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      return empspType.GetValueOrDefault() == 0 & empspType.HasValue;
    })).Count<CLS_Emp_SalaryParts>() > 0 ? 1 : 0) : 0) == 0 ? list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount + list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value + (list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 1 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount + list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 1 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value) - (list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 2 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount + list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 2 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value) : list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount + list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value;
  }

  public static simpleSalaryDetails smethod_5(int int_0)
  {
    mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
    simpleSalaryDetails simpleSalaryDetails = new simpleSalaryDetails();
    int int_0_1 = mrsalesdbEntities.emp_data.Find(new object[1]
    {
      (object) int_0
    }).emp_salerygroup.empsg_ID;
    simpleSalaryDetails.Name = mrsalesdbEntities.emp_data.Find(new object[1]
    {
      (object) int_0
    }).empdata_Name;
    ParameterExpression parameterExpression;
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    // ISSUE: method reference
    List<CLS_Emp_SalaryParts> list = mrsalesdbEntities.emp_saleryparts.Where<emp_saleryparts>((Expression<Func<emp_saleryparts, bool>>) (u => u.empsg_ID == (int?) int_0_1)).Select<emp_saleryparts, CLS_Emp_SalaryParts>(Expression.Lambda<Func<emp_saleryparts, CLS_Emp_SalaryParts>>((Expression) Expression.MemberInit(Expression.New(typeof (CLS_Emp_SalaryParts)), (MemberBinding) Expression.Bind((MethodInfo) MethodBase.GetMethodFromHandle(__methodref (CLS_Emp_SalaryParts.set_empsp_Group)), )))); // Unable to render the statement
    Decimal num1 = list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount;
    Decimal num2 = list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value;
    simpleSalaryDetails.BasicSalary = (num1 + num2) * (Decimal) HROptions.SanctionAndRewardsMonthDaysCount;
    Decimal num3 = list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount + list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 0 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value;
    Decimal num4 = list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 1 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount + list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 1 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value;
    Decimal num5 = list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 2 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 0 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount + list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      if (!(empspType.GetValueOrDefault() == 2 & empspType.HasValue))
        return false;
      int? empspStatus = u.empsp_Status;
      return empspStatus.GetValueOrDefault() == 1 & empspStatus.HasValue;
    })).Sum<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, Decimal?>) (s => s.empsp_Value)).Value;
    simpleSalaryDetails.TotalSalary = (num3 + num4 - num5) * (Decimal) HROptions.SanctionAndRewardsMonthDaysCount;
    if ((!HROptions.OverTime_byBasicOrTotal ? 0 : (list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      return empspType.GetValueOrDefault() == 0 & empspType.HasValue;
    })).Count<CLS_Emp_SalaryParts>() > 0 ? 1 : 0)) != 0)
    {
      simpleSalaryDetails.DaySalary = simpleSalaryDetails.BasicSalary / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount;
      simpleSalaryDetails.OverTimeDaySalary = (num1 + num2) * (Decimal) HROptions.OverTime_DayValue;
      simpleSalaryDetails.OverTimeHourSalary = (num1 + num2) / (Decimal) HROptions.DayHoursCount * (Decimal) HROptions.OverTime_HourValue;
    }
    else
    {
      simpleSalaryDetails.DaySalary = simpleSalaryDetails.TotalSalary / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount;
      simpleSalaryDetails.OverTimeDaySalary = (num3 + num4 - num5) * (Decimal) HROptions.OverTime_DayValue;
      simpleSalaryDetails.OverTimeHourSalary = (num3 + num4 - num5) / (Decimal) HROptions.DayHoursCount * (Decimal) HROptions.OverTime_DayValue;
    }
    if ((HROptions.penaltyDay_byBasicOrTotal ? (list.Where<CLS_Emp_SalaryParts>((Func<CLS_Emp_SalaryParts, bool>) (u =>
    {
      int? empspType = u.empsp_Type;
      return empspType.GetValueOrDefault() == 0 & empspType.HasValue;
    })).Count<CLS_Emp_SalaryParts>() > 0 ? 1 : 0) : 0) != 0)
    {
      simpleSalaryDetails.DaySalary = simpleSalaryDetails.BasicSalary / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount;
      simpleSalaryDetails.penltyOfDelayDaySalary = (num1 + num2) * (Decimal) HROptions.delayPenaltyDaysVlaue;
      simpleSalaryDetails.penltyOfDelayHourSalary = (num1 + num2) / (Decimal) HROptions.DayHoursCount * (Decimal) HROptions.delayPenaltyDaysVlaue;
    }
    else
    {
      simpleSalaryDetails.DaySalary = simpleSalaryDetails.TotalSalary / (Decimal) HROptions.SanctionAndRewardsMonthDaysCount;
      simpleSalaryDetails.penltyOfDelayDaySalary = (num3 + num4 - num5) * (Decimal) HROptions.delayPenaltyDaysVlaue;
      simpleSalaryDetails.penltyOfDelayHourSalary = (num3 + num4 - num5) / (Decimal) HROptions.DayHoursCount * (Decimal) HROptions.delayPenaltyDaysVlaue;
    }
    return simpleSalaryDetails;
  }

  public static CLS_Emp_SalaryParts smethod_6(int int_0, int int_1, DateTime dateTime_0)
  {
    Decimal num1 = 0M;
    Decimal num2 = 0M;
    mrsalesdbEntities mrsalesdbEntities = ConnectionTools.OpenConn();
    IQueryable<emp_saleryparts> source1 = mrsalesdbEntities.emp_saleryparts.Where<emp_saleryparts>((Expression<Func<emp_saleryparts, bool>>) (u => u.empsg_ID == (int?) int_1 && u.empsp_Status == (int?) 0 && u.empsp_Nature == (int?) 2));
    if (source1.Count<emp_saleryparts>() > 0)
    {
      IQueryable<sales_main> source2 = mrsalesdbEntities.sales_main.Where<sales_main>((Expression<Func<sales_main, bool>>) (u => u.smain_Date.Value.Year == dateTime_0.Year && u.smain_Date.Value.Month == dateTime_0.Month && u.emp_SalessRep.Value == int_0));
      Decimal num3;
      if (source2.Count<sales_main>() < 1)
        num3 = 0M;
      else
        num3 = source2.Sum<sales_main>((Expression<Func<sales_main, Decimal>>) (s => s.smain_NetValue.Value));
      Decimal num4 = num3;
      IQueryable<sales_sreturned_main> source3 = mrsalesdbEntities.sales_sreturned_main.Where<sales_sreturned_main>((Expression<Func<sales_sreturned_main, bool>>) (u => u.sretmain_Date.Value.Year == dateTime_0.Year && u.sretmain_Date.Value.Month == dateTime_0.Month && u.emp_PurchasesRep.Value == int_0));
      Decimal num5;
      if (source3.Count<sales_sreturned_main>() < 1)
        num5 = 0M;
      else
        num5 = source3.Sum<sales_sreturned_main>((Expression<Func<sales_sreturned_main, Decimal>>) (s => s.sretmain_NetValue.Value));
      Decimal num6 = num5;
      Decimal decimal_0 = num4 - num6;
      IQueryable<emp_saleryparts_subvalues> source4 = mrsalesdbEntities.emp_saleryparts_subvalues.Where<emp_saleryparts_subvalues>((Expression<Func<emp_saleryparts_subvalues, bool>>) (u => u.upto.Value <= decimal_0));
      Decimal num7;
      if (source4.Count<emp_saleryparts_subvalues>() < 1)
        num7 = 0M;
      else
        num7 = source4.OrderByDescending<emp_saleryparts_subvalues, Decimal?>((Expression<Func<emp_saleryparts_subvalues, Decimal?>>) (o => o.upto)).FirstOrDefault<emp_saleryparts_subvalues>().percent.Value;
      Decimal decimal_0_1 = num7;
      num2 = Class67.smethod_41(decimal_0_1, false);
      num1 = Class67.smethod_41(decimal_0 * decimal_0_1 / 100M, false);
    }
    CLS_Emp_SalaryParts clsEmpSalaryParts1 = new CLS_Emp_SalaryParts();
    CLS_Emp_SalaryParts clsEmpSalaryParts2 = clsEmpSalaryParts1;
    string str;
    if (source1.OrderByDescending<emp_saleryparts, int>((Expression<Func<emp_saleryparts, int>>) (o => o.empsp_ID)).Count<emp_saleryparts>() != 0)
      str = source1.OrderByDescending<emp_saleryparts, int>((Expression<Func<emp_saleryparts, int>>) (o => o.empsp_ID)).FirstOrDefault<emp_saleryparts>().empsp_Name;
    else
      str = "";
    clsEmpSalaryParts2.empsp_Name = str;
    clsEmpSalaryParts1.empsp_Value = new Decimal?(num1);
    CLS_Emp_SalaryParts clsEmpSalaryParts3 = clsEmpSalaryParts1;
    int? nullable;
    if (source1.OrderByDescending<emp_saleryparts, int>((Expression<Func<emp_saleryparts, int>>) (o => o.empsp_ID)).Count<emp_saleryparts>() != 0)
      nullable = source1.OrderByDescending<emp_saleryparts, int>((Expression<Func<emp_saleryparts, int>>) (o => o.empsp_ID)).FirstOrDefault<emp_saleryparts>().empsp_Group;
    else
      nullable = new int?(0);
    clsEmpSalaryParts3.empsp_Group = nullable;
    clsEmpSalaryParts1.empsp_Type = new int?(1);
    clsEmpSalaryParts1.empsp_Nature = new int?(2);
    clsEmpSalaryParts1.slicePercent = new Decimal?(num2);
    return clsEmpSalaryParts1;
  }
}