Exemplo n.º 1
0
 public LeaveTable GetLeavedetails()
 {
     LeaveTable LeaveDt = new LeaveTable();
     try
     {
         LeaveDt=IgrssAdapters.LeaveAdapter.GetData();
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "DAL"))
             throw;
     }
     return LeaveDt;
 }
Exemplo n.º 2
0
        public LeaveTable GetLeavedetails()
        {
            LeaveTable LeaveDt = new LeaveTable();

            try
            {
                LeaveDt = IgrssAdapters.LeaveAdapter.GetData();
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                {
                    throw;
                }
            }
            return(LeaveDt);
        }
Exemplo n.º 3
0
        public LeaveTable GetLeavedetailsByEmpId(Guid EmployeeID)
        {
            LeaveTable LeaveDt = new LeaveTable();

            try
            {
                LeaveDt = IgrssAdapters.LeaveAdapter.GetLeaveDetailsByEmpId(EmployeeID);
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                {
                    throw;
                }
            }
            return(LeaveDt);
        }
Exemplo n.º 4
0
        public LeaveTable GetLeavedetailsByEmployeeNo(string EmployeeNo)
        {
            LeaveTable Dt = new LeaveTable();

            try
            {
                Dt = IgrssAdapters.LeaveAdapter.LeaveDetailsByEmployeeNo(EmployeeNo);
            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                {
                    throw;
                }
            }
            return(Dt);
        }
Exemplo n.º 5
0
 public void AddLeaveDetailsTest()
 {
     IGRSS.BusinessLogicLayer.Leave target = new IGRSS.BusinessLogicLayer.Leave();
     FormViewParameter Parameter =new FormViewParameter(); // TODO: Initialize to an appropriate value
     IGRSS.DataAccessLayer.Leave.LeaveRegisterDataTable Dt = new IGRSS.DataAccessLayer.Leave.LeaveRegisterDataTable();
     DataRow dr = Dt.NewRow();
     dr["EmployeeID"] = new Guid("fc9b70d5-9344-4059-87f2-a9d082601c76");
     dr["LeaveType"] = new Guid("9ec9c473-dd5d-47af-885a-59a65a5bb651");
     dr["LeaveFrom"] = DateTime.Now;
     dr["LeaveTo"] = DateTime.Now;
     dr["Reason"] ="just not filing well";
     dr["ResumedDutyOn"] = DateTime.Now.AddDays(5);
     Parameter.Values = Dt.Rows[0];
     Dt.Rows.Add(dr);
     bool expected = true;
     Assert.AreEqual(expected, target.AddLeaveDetails(Parameter), "IGRSS.BusinessLogicLayer.Leave.AddLeaveDetails did not return the expected value." +
             "");
 }
Exemplo n.º 6
0
        public void AddLeaveDetailsTest()
        {
            IGRSS.BusinessLogicLayer.Leave target = new IGRSS.BusinessLogicLayer.Leave();
            FormViewParameter Parameter           = new FormViewParameter(); // TODO: Initialize to an appropriate value

            IGRSS.DataAccessLayer.Leave.LeaveRegisterDataTable Dt = new IGRSS.DataAccessLayer.Leave.LeaveRegisterDataTable();
            DataRow dr = Dt.NewRow();

            dr["EmployeeID"]    = new Guid("fc9b70d5-9344-4059-87f2-a9d082601c76");
            dr["LeaveType"]     = new Guid("9ec9c473-dd5d-47af-885a-59a65a5bb651");
            dr["LeaveFrom"]     = DateTime.Now;
            dr["LeaveTo"]       = DateTime.Now;
            dr["Reason"]        = "just not filing well";
            dr["ResumedDutyOn"] = DateTime.Now.AddDays(5);
            Parameter.Values    = Dt.Rows[0];
            Dt.Rows.Add(dr);
            bool expected = true;

            Assert.AreEqual(expected, target.AddLeaveDetails(Parameter), "IGRSS.BusinessLogicLayer.Leave.AddLeaveDetails did not return the expected value." +
                            "");
        }
Exemplo n.º 7
0
 public LeaveTable GetLeavedetailsByEmpId(Guid EmployeeID)
 {
     LeaveTable LeaveDt = new LeaveTable();
     try
     {
         LeaveDt=IgrssAdapters.LeaveAdapter.GetLeaveDetailsByEmpId(EmployeeID);
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "DAL"))
             throw;
     }
     return LeaveDt;
 }
Exemplo n.º 8
0
 public LeaveTable GetLeavedetailsByEmployeeNo(string EmployeeNo)
 {
     LeaveTable Dt = new LeaveTable();
     try
     {
         Dt=IgrssAdapters.LeaveAdapter.LeaveDetailsByEmployeeNo(EmployeeNo);
     }
     catch (Exception ex)
     {
         if (ExceptionPolicy.HandleException(ex, "DAL"))
             throw;
     }
     return Dt;
 }