public LeaveTable GetLeavedetails() { LeaveTable LeaveDt = new LeaveTable(); try { LeaveDt=IgrssAdapters.LeaveAdapter.GetData(); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) throw; } return LeaveDt; }
public LeaveTable GetLeavedetails() { LeaveTable LeaveDt = new LeaveTable(); try { LeaveDt = IgrssAdapters.LeaveAdapter.GetData(); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } } return(LeaveDt); }
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); }
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); }
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." + ""); }
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." + ""); }
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; }
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; }