//public Leave_App_VW GetJOingDate(string CmpyCode,)
        //{



        //}
        public Leave_App_VW SaveLeaveApp(Leave_App_VW LeaveApp)
        {
            //bool t= _CodeRep.GetSalaryProcess(LeaveApp.CmpyCode, LeaveApp.EmpCode, LeaveApp.StartDate);
            // if(t==false)
            // {
            //     LeaveApp.ErrorMessage = "Salary Process Genereted this Month...You can not Change ...!";
            //     LeaveApp.IsSavedFlag = false;
            //     return LeaveApp;
            // }
            if (!LeaveApp.IsEditMode)
            {
                LeaveApp.PRLR001_CODE = _CodeRep.GetCode(LeaveApp.CmpyCode, "LeaveApplication");
            }

            LeaveApp.COUNTRY  = _CodeRep.GetCountryP(LeaveApp.CmpyCode, LeaveApp.Entry_Dates);
            LeaveApp.DIVISION = _CodeRep.GetDiv(LeaveApp.CmpyCode, LeaveApp.EmpCode);

            if (LeaveApp.COUNTRY == null)
            {
                LeaveApp.IsSavedFlag  = false;
                LeaveApp.ErrorMessage = "PayRoll Config not Generated";
                return(LeaveApp);
            }
            else
            {
                return(_LeaveAppRepo.SaveLeaveApp(LeaveApp));
            }
        }
        public DutyResumeVM SaveDrs(DutyResumeVM Drs)
        {
            Drs.division = _codeRep.GetDiv(Drs.Cmpycode, Drs.EmpCode);
            Drs.country  = _codeRep.GetCountryP(Drs.Cmpycode, Drs.ResumeDate);
            if (Drs.country == null)
            {
                Drs.SaveFlag     = false;
                Drs.ErrorMessage = "PayRoll Config not Generated";
                return(Drs);
            }
            else
            {
                return(_DrRepo.SaveDrs(Drs));
            }

            // return _DrRepo.SaveDrs(Drs);
        }
Ejemplo n.º 3
0
 public LoanAppliationVM SaveLoanApp(LoanAppliationVM LoanApp)
 {
     if (!LoanApp.EditFlag)
     {
         LoanApp.PRLA001_CODE = _CodeRep.GetCode(LoanApp.CmpyCode, "LoanAppliation");
     }
     LoanApp.COUNTRY = _CodeRep.GetCountryP(LoanApp.CmpyCode, LoanApp.Entry_Date);
     if (LoanApp.COUNTRY == null)
     {
         LoanApp.SaveFlag     = false;
         LoanApp.ErrorMessage = "PayRoll Config not Generated";
         return(LoanApp);
     }
     else
     {
         return(_LoanAppRepo.SaveLoanApp(LoanApp));
     }
 }
        public MonthlyAdddedVM SaveMonthlyAD(MonthlyAdddedVM MonthlyAD)
        {
            if (!MonthlyAD.EditFlag)
            {
                MonthlyAD.PRADN001_CODE = _CodeRep.GetCode(MonthlyAD.CmpyCode, "MonthlyAddded");
            }

            MonthlyAD.COUNTRY = _CodeRep.GetCountryP(MonthlyAD.CmpyCode, MonthlyAD.Entry_Date);

            if (MonthlyAD.COUNTRY == null)
            {
                MonthlyAD.SaveFlag     = false;
                MonthlyAD.ErrorMessage = "PayRoll Config not Generated";
                return(MonthlyAD);
            }
            else
            {
                return(_MonthlyAdddedPayrollRepo.SaveMonthlyAD(MonthlyAD));
            }
        }
Ejemplo n.º 5
0
        public LeaveSettlementVM SaveLiv(LeaveSettlementVM Liv)
        {
            if (!Liv.EditFlag)
            {
                Liv.PRLS001_CODE = _CodeRep.GetCode(Liv.CMPYCODE, "LeaveSettlement");
            }

            Liv.COUNTRY  = _CodeRep.GetCountryP(Liv.CMPYCODE, Liv.Entry_Date);
            Liv.DIVISION = _CodeRep.GetDiv(Liv.CMPYCODE, Liv.Empcode);
            if (Liv.COUNTRY == null)
            {
                Liv.SaveFlag     = false;
                Liv.ErrorMessage = "PayRoll Config not Generated";
                return(Liv);
            }
            else
            {
                return(_LvPayrollRepo.SaveLiv(Liv));
            }
        }
Ejemplo n.º 6
0
        public SalarMpayrollVM SaveSry(SalarMpayrollVM Sry)
        {
            if (!Sry.EditFlag)
            {
                Sry.PRSM001_CODE = _codeRep.GetCode(Sry.CMPYCODE, "Salary Master");
            }

            Sry.COUNTRY  = _codeRep.GetCountryP(Sry.CMPYCODE, Sry.Entery_date);
            Sry.DIVISION = _codeRep.GetDiv(Sry.CMPYCODE, Sry.EMPCODE);

            if (Sry.COUNTRY == null)
            {
                Sry.SaveFlag     = false;
                Sry.ErrorMessage = "PayRoll Config not Generated";
                return(Sry);
            }
            else
            {
                return(_SalzPayrollRepo.SaveSry(Sry));
            }
        }
Ejemplo n.º 7
0
 public string GetCountryP(string CmpyCode, DateTime dt)
 {
     return(_CodeRep.GetCountryP(CmpyCode, dt));
 }