Example #1
0
        /// <summary>
        /// مقدار پارامتر قانون پرسنل را برمی گرداند
        /// </summary>
        /// <param name="currentDate">تاریخ جاری</param>
        /// <param name="person">پرسنل</param>
        /// <param name="ruleIdentifier">کد قانون</param>
        /// <param name="parameterName">نام پارامتر</param>
        /// <returns>مقدار پارامتر</returns>
        private object GetRuleParameter(DateTime currentDate, Person person, int ruleIdentifier, string parameterName)
        {
            try
            {
                if (person.AssignedRuleList != null)
                {
                    AssignedRule ar = person.AssignedRuleList.Where(x => x.FromDate <= currentDate && x.ToDate >= currentDate && x.IdentifierCode == ruleIdentifier).FirstOrDefault();
                    if (ar != null)
                    {
                        EntityRepository <AssignRuleParameter> paramRep  = new EntityRepository <AssignRuleParameter>();
                        IList <AssignRuleParameter>            paramList = paramRep.Find(x => x.Rule.ID == ar.RuleId).ToList();

                        AssignRuleParameter asp = paramList.Where(x => x.FromDate <= currentDate && x.ToDate >= currentDate).FirstOrDefault();
                        if (asp != null)
                        {
                            RuleParameter parameter = asp.RuleParameterList.Where(x => x.Name.ToLower().Equals(parameterName.ToLower())).FirstOrDefault();

                            if (parameter != null)
                            {
                                return(parameter.Value);
                            }
                        }
                    }
                }
                return(null);
            }
            catch (Exception ex)
            {
                BaseBusiness <Entity> .LogException(ex, "BUserInfo", "GetRuleParameter");

                throw ex;
            }
        }
Example #2
0
        public override void R4003(AssignedRule MyRule)
        {
            //ماموريت ساعتي 2004
            //4007 مفهوم اضافه کارساعتي بعد ازوقت
            //4008 مفهوم اضافه کارساعتي قبل ازوقت
            //2012 مجوز ماموريت در ساعات غيرکاري
            //4001 اضافه خالص کارساعتي
            //4002 اضافه کارساعتي
            //2023 مفهوم مجموع ماموريت ساعتي
            //2028 مفهوم ماموریت خارج از شیفت در روز کاری
            GetLog(MyRule, DebugRuleState.Before, 13, 4008, 2004, 4007, 2012, 4002, 2023);
            if (this.DoConcept(2028).Value > 0)
            {
                foreach (IPair pair in ((PairableScndCnpValue)this.DoConcept(2028)).Pairs)
                {
                    ((PairableScndCnpValue)this.DoConcept(4001))
                    .AppendPairs(Operation.Differance(pair, this.Person.GetShiftByDate(this.RuleCalculateDate)));

                    ((PairableScndCnpValue)this.DoConcept(4002))
                    .AppendPairs(Operation.Differance(pair, this.Person.GetShiftByDate(this.RuleCalculateDate)));

                    if (Operation.Intersect(pair, this.DoConcept(2004)).Value == 0)
                    {
                        ((PairableScndCnpValue)this.DoConcept(2004)).AppendPair(pair);
                    }
                }
                this.ReCalculate(13, 2023, 4007, 4008);
            }
            GetLog(MyRule, DebugRuleState.After, 2004, 4007, 2012, 4002, 2023);
        }
Example #3
0
        /// <summary>
        /// اعمال تاخیر روز بعد از رست
        /// </summary>
        /// <param name="MyRule"></param>
        public void R3503(AssignedRule MyRule)
        {
            //1501 رست
            //3028 غیبت ساعنی
            //3004 غیبت روزانه
            //3029 تاخیر
            //3020 غیبت ساتی مجاز
            //3021 تاخیر ساعتی مجاز
            //3024 تاخیر مجاز ماهانه
            //3026 غیبت مجاز ماهانه
            //3032 تاخیر ماهانه
            //3034 غیبت ساعتی ماهانه
            // 3 کارکرد ناخالص ماهانه
            //5 کارکرد روزانه ماهانه
            GetLog(MyRule, DebugRuleState.Before, 2, 4, 1501, 3020, 3021, 3028, 3029, 13, 3020, 3028, 3, 5, 3024, 3026, 3032, 3034);
            if (this.DoConcept(1501).Value == 0 && this.DoConcept(3004).Value == 0 && this.DoConcept(3029).Value > 0 &&
                this.DoConcept(1501, this.RuleCalculateDate.AddDays(-1)).Value > 0 &&
                !EngEnvironment.HasCalendar(this.ConceptCalculateDate, "3"))
            {
                int   allowToTime = MyRule["first", this.RuleCalculateDate].ToInt();
                IPair alowPair    = new PairableScndCnpValuePair(this.Person.GetShiftByDate(this.RuleCalculateDate).PastedPairs.From, allowToTime);
                this.DoConcept(3021).Value = Operation.Intersect(alowPair, this.DoConcept(3029)).Value;
                ((PairableScndCnpValue)this.DoConcept(3029)).AddPairs(Operation.Differance(this.DoConcept(3029), alowPair));
                this.DoConcept(2).Value += this.DoConcept(3021).Value;
                this.DoConcept(4).Value  = 1;
                this.ReCalculate(13, 3020, 3028, 5, 3, 3024, 3026, 3032, 3034);
            }

            GetLog(MyRule, DebugRuleState.After, 2, 4, 1501, 3020, 3021, 3028, 3029, 13, 3020, 3028, 3, 5, 3024, 3026, 3032, 3034);
        }
Example #4
0
        /// <summary>
        /// کارکرد روزانه ماهانه
        /// هیئت علمی
        /// </summary>
        /// <param name="MyRule"></param>
        public void R2504(AssignedRule MyRule)
        {
            //1 تعطیل رسمی
            //3 کارکرد ناخالص ماهانه
            //5 کارکرد خالص ماهانه

            if (this.DoConcept(5021).Value > 0)
            {
                DateRange dateRange = this.GetDateRange(3, this.RuleCalculateDate);
                if (dateRange != null)
                {
                    DateTime monthStart = dateRange.FromDate; // Utility.ToMildiDate(String.Format("{0}/{1}/{2}", Utility.ToPersianDateTime(this.RuleCalculateDate).Year, Utility.ToPersianDateTime(this.RuleCalculateDate).Month, 1));
                    DateTime endOfMonth = dateRange.ToDate;   // Utility.GetEndOfPersianMonth(this.RuleCalculateDate);


                    int presence = 0;
                    for (DateTime date = monthStart; date <= endOfMonth; date = date.AddDays(1))
                    {
                        if (this.DoConcept(1, date).Value > 0)
                        {
                            presence++;
                        }
                    }
                    if (presence > 0)
                    {
                        GetLog(MyRule, DebugRuleState.Before, 5);

                        this.DoConcept(5).Value = presence;

                        GetLog(MyRule, DebugRuleState.After, 5);
                    }
                }
            }
        }
Example #5
0
        /// <summary>
        /// به ازای هر روز تعطیل رسمی و غیر رسمی مقدار ----ساعت کسر کار اضافه شود
        /// </summary>
        /// <param name="MyRule"></param>
        public virtual void R2501(AssignedRule MyRule)
        {
            //var conceptList = new[] { 3028, 4002,4003,1003,1056,1008,3008,3029,3010,3030,2004,2013,
            //                          5002,17,1053,1023,1038,1024,1039,1041,1026,2016,2017,2018,2019,
            //                          2020,2021,2022,2023,2014,4007,4009,3015,4008,1025,1027,1040,1042,
            //                          1054,4014,4012,1057,1058,1059,1060,1061,1062,1078,4011,4023,3040,
            //                          3042,3044,4030,4034,4035,4038,4040,4042,4044,4046,5038,4048,2060};
            //foreach (int calcDate in conceptList)
            //{
            //    if (this.DoConcept(calcDate).Value > 0)
            //    {
            //        int tt3028_rem;
            //        Decimal tt3028 = Math.Truncate(this.DoConcept(calcDate).Value / 60m);
            //        if (tt3028 > 0)
            //        {
            //            tt3028 = tt3028 * 60;
            //        }
            //        tt3028_rem = this.DoConcept(calcDate).Value;
            //        if (this.DoConcept(calcDate).Value > 60)
            //        {
            //            tt3028_rem = this.DoConcept(calcDate).Value % 60;
            //        }

            //        if (tt3028_rem >= 16 && tt3028_rem <= 45)
            //        {
            //            tt3028 += 30;
            //        }
            //        else if (tt3028_rem >= 46 && tt3028_rem <= 59)
            //        {
            //            tt3028 += 60;
            //        }
            //        this.DoConcept(calcDate).Value = Convert.ToInt32(tt3028);
            //    }
            //}
        }
Example #6
0
        /// <summary>
        /// محاسبه اضافه کار خالص شده
        /// غیبت تا 2 ساعت بخشوده و مازاد آن با ضریب دو از اضافه کار کسر گردد
        /// مقادیر اولیه غیبت و اضافه کار تغییر نکند
        /// </summary>
        /// <param name="MyRule"></param>
        public virtual void R6501(AssignedRule MyRule)
        {
            //4005 اضافه کارساعتي مجاز ماهانه
            //3034 غیبت ساعتی غیرمجاز ماهانه
            //4502 اضافه کار خالص شده ماهانه
            int zarib   = MyRule["first", this.RuleCalculateDate].ToInt();
            int maxHour = MyRule["second", this.RuleCalculateDate].ToInt();

            if (this.DoConcept(9).Value > 0)
            {
                GetLog(MyRule, DebugRuleState.Before, 4502);
            }
            {
                int overwork = this.DoConcept(4005).Value;
                int absecns  = this.DoConcept(3034).Value;
                if (absecns > maxHour)
                {
                    absecns  -= maxHour;
                    absecns  *= zarib;
                    overwork -= absecns;
                    this.DoConcept(4502).Value = overwork;
                }
                else
                {
                    // this.DoConcept(4502).Value = 0;
                    this.DoConcept(4502).Value = this.DoConcept(4005).Value;
                }
                GetLog(MyRule, DebugRuleState.After, 4502);
            }
        }
Example #7
0
        /// <summary>
        /// محدوده مجاز اضافه کار ماموریت برای پرسنل بدون شیفت
        /// </summary>
        /// <param name="MyRule"></param>
        public virtual void R6511(AssignedRule MyRule)
        {
            //اضافه کار خاص ساعتي 4001
            //4002 اضافه کار ساعتی
            //4003 اضافه کار ساعتی عیر مجاز
            Permit permit = Person.GetPermitByDate(ConceptCalculateDate, EngEnvironment.GetPrecard(Precards.OverTime));

            if (this.Person.GetShiftByDate(this.RuleCalculateDate).Value == 0 && this.RuleCalculateDate.DayOfWeek != DayOfWeek.Thursday && !EngEnvironment.HasCalendar(this.RuleCalculateDate, "1") && this.DoConcept(2004).Value > 0)
            {
                GetLog(MyRule, DebugRuleState.Before, 4003, 4002);
                var temp = Operation.Differance(Operation.Intersect(this.DoConcept(4002), this.DoConcept(2004)), new PairableScndCnpValuePair(MyRule["First", this.RuleCalculateDate].ToInt(), MyRule["Second", RuleCalculateDate].ToInt()));
                ((PairableScndCnpValue)this.DoConcept(4003)).AppendPairs(temp);


                ((PairableScndCnpValue)this.DoConcept(4002))
                .AddPairs(Operation.Differance(this.DoConcept(4002), temp));
            }

            else if (this.RuleCalculateDate.DayOfWeek == DayOfWeek.Thursday && this.DoConcept(2004).Value > 0)
            {
                var temp = Operation.Differance(Operation.Intersect(this.DoConcept(4002), this.DoConcept(2004)), new PairableScndCnpValuePair(MyRule["Third", this.RuleCalculateDate].ToInt(), MyRule["Forth", RuleCalculateDate].ToInt()));
                ((PairableScndCnpValue)this.DoConcept(4003)).AppendPairs(temp);


                ((PairableScndCnpValue)this.DoConcept(4002))
                .AddPairs(Operation.Differance(this.DoConcept(4002), temp));
            }
            else if (this.RuleCalculateDate.DayOfWeek != DayOfWeek.Thursday && EngEnvironment.HasCalendar(this.RuleCalculateDate, "1") && this.DoConcept(2004).Value > 0)
            {
                var temp = Operation.Intersect(this.DoConcept(4002), this.DoConcept(2004));
                ((PairableScndCnpValue)this.DoConcept(4003)).AppendPairs(temp);
                ((PairableScndCnpValue)DoConcept(4002)).ClearPairs();
            }
            GetLog(MyRule, DebugRuleState.After, 4003, 4002);
        }
Example #8
0
        /// <summary>قانون متفرقه- ماهانه غیبتهای ساعتی با اضافه کار جبران شود
        /// </summary>
        ///
        public void R285(AssignedRule MyRule)
        {
            //غيبت ساعتی ماهانه 3034
            //اضافه کار ساعتي ماهانه 4005
            //8 کارکردخالص ساعتي ماهانه
            //5 کارکردخالص روزانه ماهانه
            //3026 غيبت ساعتی مجاز ماهانه
            GetLog(MyRule, " Before Execute State:", 3034, 4005, 8, 4005);
            int t = this.DoConcept(3034).Value;

            if (this.DoConcept(4005).Value > 0 && t > 0)
            {
                int tmp = Operation.Minimum(this.DoConcept(4005).Value, t);
                this.DoConcept(3034).Value -= tmp;
                this.DoConcept(3026).Value += tmp;
                this.DoConcept(8).Value    += tmp;
                this.DoConcept(4005).Value -= tmp;
                if (this.DoConcept(3034).Value <= 0)
                {
                    this.DoConcept(3034).Value = 1;
                }
                if (this.DoConcept(4005).Value <= 0)
                {
                    this.DoConcept(4005).Value = 1;
                }
            }
            GetLog(MyRule, " After Execute State:", 3034, 4005, 8, 4005);
        }
Example #9
0
        /// <summary>
        /// وظیفه اجرای مفاهیم ماهانه
        /// </summary>
        /// <param name="MyRule"></param>
        public override void R97(AssignedRule MyRule)
        {
            this.DoConcept(9);    //حضورماهانه
            this.DoConcept(4005); //اضافه کارساعتي مجاز ماهانه
            this.DoConcept(4006); //اضافه کارساعتي غیرمجاز ماهانه
            this.DoConcept(4020); //اضافه کار بین وقت ماهانه

            this.DoConcept(3026); //غيبت ساعتي مجاز ماهانه
            this.DoConcept(3034); //غیبت ساعتی غیرمجاز ماهانه
            this.DoConcept(1006); //مرخصي استحقاقي روزانه ماهانه
            this.DoConcept(1011); //مرخصي استحقاقي ساعتي ماهانه
            this.DoConcept(1074); //مرخصي بي حقوق ساعتي ماهانه
            this.DoConcept(1076); //مرخصي بي حقوق روزانه ماهانه
            this.DoConcept(1016); //مرخصی استعلاجی ساعتی ماهانه
            this.DoConcept(3005); //غيبت روزانه ماهانه


            this.DoConcept(8);    //کارکردخالص ساعتي ماهانه
            this.DoConcept(5);    //کارکردخالص روزانه ماهانه
            this.DoConcept(2007); //ماموريت ساعتي ماهانه
            this.DoConcept(2006); //ماموريت روزانه ماهانه
            this.DoConcept(3);    //کارکردناخالص ماهانه
            this.DoConcept(10);   //کارکردلازم ماهانه
            this.DoConcept(1017); //مرخصی استعلاجی ماهانه
            this.DoConcept(5013); //کد وضعیت روز جهت رنگ ماهانه
            this.DoConcept(5015); //کارکرد لازم برای حق غذا ماهانه
            this.DoConcept(5016); //طول دوره محدوده محاسبات ماهانه

            this.DoConcept(2035); //ماموریت خارجی ماهانه
            this.DoConcept(1097); // مجموع مرخصی با حقوق روزانه ماهانه

            this.DoConcept(22);   //حضور در تعطیلات خاص ماهانه
            this.DoConcept(21);   //حضور تعطیلات خاص ماهانه
            this.DoConcept(1502); //رست
        }
Example #10
0
        /// <summary>
        /// ماموریت روزانه در روز پنج شنبه ... برابر شود
        /// </summary>
        /// <param name="MyRule"></param>
        public void R143(AssignedRule MyRule)
        {
            // ماموریت روزانه در روزهای پنج شنبه با ضریب
            // First
            // محاسبه شود

            var conceptIds = new[]
            {
                2005, // مجموع ماموريت روزانه
            };

            GetLog(MyRule, " Before Execute State:", conceptIds);

            if (
                this.RuleCalculateDate.DayOfWeek == DayOfWeek.Thursday &&
                this.DoConcept(2005).Value > 0
                )
            {
                var coEfficient = (MyRule["First", this.RuleCalculateDate].ToInt() / 100f);
                var temp        = (int)Math.Round((this.DoConcept(2005).Value *coEfficient));

                this.DoConcept(2005).Value += temp;
            }

            GetLog(MyRule, " After Execute State:", conceptIds);
        }
Example #11
0
        /// <summary>
        /// محاسبه تعداد تاخیر و تعجیل
        /// </summary>
        /// <param name="MyRule"></param>
        public virtual void R5501(AssignedRule MyRule)
        {
            //تاخیر ساعتی غیرمجاز 3029
            //تعجیل ساعتی غیرمجاز 3030
            //3501 تعداد تاخیر و تعجیل
            //3502 تعداد تاخیر و تعجیل ماهانه

            GetLog(MyRule, DebugRuleState.Before, 3501, 3502);
            if (this.DoConcept(3004).Value == 0)
            {
                if (this.DoConcept(3029).Value > 0)
                {
                    this.DoConcept(3501).Value++;
                }
                if (this.DoConcept(3030).Value > 0)
                {
                    this.DoConcept(3501).Value++;
                }
                if (this.DoConcept(3501).Value > 0)
                {
                    this.ReCalculate(3502);
                }
            }
            GetLog(MyRule, DebugRuleState.After, 3501, 3502);
        }
Example #12
0
        /// <summary>  کد  حداکثر اضافه کاری بعد از وقت - پارامتر پویا</summary>
        /// <remarks></remarks>
        //اضافه کار مجاز4002
        public virtual void R6507(AssignedRule MyRule)
        {
            GetLog(MyRule, DebugRuleState.Before, 4002, 4003, 4007, 13);
            var personParam = this.Person.PersonTASpec.GetParamValue(this.Person.ID, "MAXEBAV", this.RuleCalculateDate);

            if (personParam != null && this.DoConcept(4007).Value > System.Convert.ToInt32(personParam.Value))
            {
                int notAllowValue             = this.DoConcept(4007).Value - System.Convert.ToInt32(personParam.Value);
                PairableScndCnpValue notAllow = new PairableScndCnpValue();
                foreach (PairableScndCnpValuePair pair in ((PairableScndCnpValue)this.DoConcept(4007)).Pairs.OrderByDescending(x => x.From))
                {
                    if (pair.Value >= notAllowValue)
                    {
                        IPair notAloowPair = new PairableScndCnpValuePair(pair.To - notAllowValue, pair.To);
                        notAllow.Pairs.Add(notAloowPair);
                        notAllowValue = 0;
                        break;
                    }
                    else
                    {
                        notAllowValue -= pair.Value;
                        notAllow.Pairs.Add(pair);
                    }
                }
                ((PairableScndCnpValue)this.DoConcept(4003)).AppendPairs(Operation.Intersect(this.DoConcept(4002), notAllow));
                ((PairableScndCnpValue)this.DoConcept(4002)).AddPairs(Operation.Differance(this.DoConcept(4002), notAllow));
                this.ReCalculate(13, 4007);
            }

            GetLog(MyRule, DebugRuleState.After, 4002, 4003, 4007, 13);
        }
Example #13
0
        /// <summary>
        /// اعمال حق التدریس برای برخی از پرسنل
        /// </summary>
        /// <param name="MyRule"></param>
        public void R2502(AssignedRule MyRule)
        {
            //1082 مجموع انواع مرخصی ساعتی
            //2023 مفهوم مجموع ماموريت ساعتي
            var conceptList = new[] { 2, 3, 13, 3020, 3028, 3044, 4002, 4005, 4006, 4007 };

            GetLog(MyRule, " Before Execute State:", conceptList);
            var personParam = this.Person.PersonTASpec.GetParamValue(this.Person.ID, "hagholtadris", this.RuleCalculateDate);

            /*  if (personParam != null && !Utility.IsEmpty(personParam.Value) && this.DoConcept(9).Value > 0)
             * {
             *    int value = Utility.ToInteger(personParam.Value) * 60;
             *    this.DoConcept(501).Value = value;
             *    if (this.DoConcept(9).Value >= value)
             *    {
             *        this.DoConcept(9).Value -= value;
             *        this.DoConcept(3).Value -= value;
             *    }
             *    else
             *    {
             *        this.DoConcept(8).Value = 0;
             *        this.DoConcept(3).Value = 0;
             *    }
             * }*/
            GetLog(MyRule, " After Execute State:", conceptList);
        }
Example #14
0
        public override void R3008(AssignedRule MyRule)
        {
            //13 کارکردناخالص
            //1005 مفهوم مرخصي استحقاقي روزانه
            //1003 مفهوم مرخصي استحقاقي ساعتي
            //110 مفهوم مرخصي بايد به کارکرد خالص اضافه شود
            //1001 مرخصي درروز

            //مرخصی ساعتی با حقوق-دادگاه 1025
            //مرخصی ساعتی با حقوق 1027

            //مرخصی با حقوق روزانه_فوت بستگان 1029
            //مرخصی با حقوق روزانه_جبرانی ماموریت 1031
            //مرخصی با حقوق روزانه_زایمان 1033
            //مرخصی با حقوق روزانه 1035
            //مرخصی با حقوق روزانه-دادگاه ورزشی 1037
            //1010  مرخصی استعلاجی روزانه
            //1090 مفهوم مجموع انواع مرخصی روزانه
            //1008مرخصی استعلاجی ساعتی
            GetLog(MyRule, DebugRuleState.Before, 13);
            if (MyRule["First", this.RuleCalculateDate].ToInt() == 0)
            {
                if (this.DoConcept(1090).Value >= 1)
                {
                    this.DoConcept(13).Value  = this.DoConcept(1090).Value *this.DoConcept(1001).Value;
                    this.DoConcept(13).Value += this.DoConcept(4002).Value;
                }
                else
                {
                    //به دلیل اینکه در اضافه کار مرخصی های خارج از شیفت
                    //لحاظ شده است و در تعریف کارکردناخالص به آن اضافه گشته
                    //در این جا اشتراک مرخصی و شیفت را به کارکردناخالص اضافه میکنیم

                    int value = 0;
                    value += Operation.Intersect(this.Person.GetShiftByDate(this.RuleCalculateDate), this.DoConcept(1003)).Value;
                    value += Operation.Intersect(this.Person.GetShiftByDate(this.RuleCalculateDate), this.DoConcept(1008)).Value;
                    value += Operation.Intersect(this.Person.GetShiftByDate(this.RuleCalculateDate), this.DoConcept(1038)).Value;
                    value += Operation.Intersect(this.Person.GetShiftByDate(this.RuleCalculateDate), this.DoConcept(1025)).Value;
                    value += Operation.Intersect(this.Person.GetShiftByDate(this.RuleCalculateDate), this.DoConcept(1027)).Value;
                    value += Operation.Intersect(this.Person.GetShiftByDate(this.RuleCalculateDate), this.DoConcept(1010)).Value;
                    value += Operation.Intersect(this.Person.GetShiftByDate(this.RuleCalculateDate), this.DoConcept(1008)).Value;


                    if (value > 0)
                    {
                        this.DoConcept(13).Value += value;
                    }
                }
            }
            else //مرخصی به کارکرد خالص اضافه شده و حالا کافی است کارکرد ناخالص دوباره محاسبه شود
            {
                this.ReCalculate(13);
            }
            if (this.DoConcept(1090).Value >= 1)
            {
                this.DoConcept(4).Value = 1;//مانا آرد
            }
            GetLog(MyRule, DebugRuleState.After, 13);
        }
Example #15
0
        /// <summary>
        /// مرخصی استحقاقی کارکنان نوبت کار
        /// </summary>
        /// <param name="MyRule"></param>
        public virtual void R3502(AssignedRule MyRule)
        {
            GetLog(MyRule, DebugRuleState.Before, 1003, 1005);

            string s1 = MyRule["First", this.RuleCalculateDate].ToString();
            string s2 = MyRule["Second", this.RuleCalculateDate].ToString();
            string s3 = MyRule["Third", this.RuleCalculateDate].ToString();
            string s4 = MyRule["Fourth", this.RuleCalculateDate].ToString();
            string s5 = MyRule["Fifth", this.RuleCalculateDate].ToString();
            string s6 = MyRule["Sixth", this.RuleCalculateDate].ToString();
            bool   z1 = (this.Person.GetShiftByDate(this.RuleCalculateDate, s1).Value == 0 ? true : false);

            if (z1 && this.DoConcept(1005).Value > 0)
            {
                this.DoConcept(1005).Value = 1;
            }

            bool z2 = (this.Person.GetShiftByDate(this.RuleCalculateDate, s2).Value == 0 ? true : false);

            if (z2 && this.DoConcept(1005).Value > 0)
            {
                this.DoConcept(1005).Value = 1;
            }

            bool z3 = (this.Person.GetShiftByDate(this.RuleCalculateDate, s3).Value == 0 ? true : false);

            if (z3 && this.DoConcept(1005).Value > 0)
            {
                this.DoConcept(1005).Value = 1;
                this.DoConcept(1003).Value = 240;
                this.Person.AddUsedLeave(this.RuleCalculateDate, 240, null);
            }

            bool z4 = (this.Person.GetShiftByDate(this.RuleCalculateDate, s4).Value == 0 ? true : false);

            if (z4 && this.DoConcept(1005).Value > 0)
            {
                this.DoConcept(1005).Value = 4;
                this.DoConcept(1003).Value = 240;
                this.Person.AddUsedLeave(this.RuleCalculateDate, 240, null);
            }

            bool z5 = (this.Person.GetShiftByDate(this.RuleCalculateDate, s5).Value == 0 ? true : false);

            if (z5 && this.DoConcept(1005).Value > 0)
            {
                this.DoConcept(1005).Value = 3;
                this.DoConcept(1003).Value = 240;
                this.Person.AddUsedLeave(this.RuleCalculateDate, 240, null);
            }

            bool z6 = (this.Person.GetShiftByDate(this.RuleCalculateDate, s6).Value == 0 ? true : false);

            if (z6 && this.DoConcept(1005).Value > 0)
            {
                this.DoConcept(1005).Value = 3;
            }
            GetLog(MyRule, DebugRuleState.After, 1003, 1005);
        }
Example #16
0
 /// <summary>  اضافه کاری 2</summary>
 /// <remarks></remarks>
 //اضافه کار مجاز4002
 public virtual void R6597(AssignedRule MyRule)
 {
     GetLog(MyRule, DebugRuleState.Before, 4003);
     if (this.DoConcept(1005).Value == 1)
     {
         ((PairableScndCnpValue)this.DoConcept(4003)).AppendPairs(((PairableScndCnpValue)this.DoConcept(1)));
     }
     GetLog(MyRule, DebugRuleState.After, 4003);
 }
Example #17
0
        public override void R1014(AssignedRule MyRule)
        {
            GetLog(MyRule, DebugRuleState.Before, 4002);

            ((PairableScndCnpValue)this.DoConcept(4002))
            .AddPairs(Operation.Differance(this.DoConcept(4002),
                                           new PairableScndCnpValuePair(MyRule["First", this.RuleCalculateDate].ToInt(), MyRule["Second", this.RuleCalculateDate].ToInt())));
            GetLog(MyRule, DebugRuleState.After, 4002);
        }
Example #18
0
 /// <summary>   اضافه کاری 1</summary>
 /// <remarks></remarks>
 //اضافه کار مجاز4002
 public virtual void R6598(AssignedRule MyRule)
 {
     GetLog(MyRule, DebugRuleState.Before, 4002);
     if (this.DoConcept(2031).Value == 1)
     {
         this.DoConcept(4002).Value = 0;
     }
     GetLog(MyRule, DebugRuleState.After, 4002);
 }