/// <summary> /// Method to get Joint Working Dates /// </summary> /// <param name="companyCode"></param> /// <param name="parentuserCode"></param> /// <param name="parentuserName"></param> /// <param name="childuserCode"></param> /// <param name="childuserName"></param> /// <param name="startDate"></param> /// <param name="endDate"></param> /// <returns></returns> public JointWorkingDatesModel GetJointWorkingDates(string companyCode, string parentuserCode, string parentuserName, string childuserCode, string childuserName, string startDate, string endDate) { JointWorkingDatesModel lstdtes = new JointWorkingDatesModel(); try { List <JointDatesModel> lstParentdates = null; List <JointDatesModel> lstchilddates = null; using (IDbConnection connection = IDbOpenConnection()) { var p = new DynamicParameters(); p.Add("@Company_Code", companyCode); p.Add("@Parent_UserCode", parentuserCode); p.Add("@Parent_UserName", parentuserName); p.Add("@Child_UserCode", childuserCode); p.Add("@Child_UserName", childuserName); p.Add("@Start_Date", startDate); p.Add("@End_Date", endDate); using (var multiselect = connection.QueryMultiple(SP_HD_ICE_GETJOINTWORKINGDATES, p, commandType: CommandType.StoredProcedure)) { lstParentdates = multiselect.Read <JointDatesModel>().ToList(); lstchilddates = multiselect.Read <JointDatesModel>().ToList(); } lstdtes.lstParentDates = lstParentdates; lstdtes.lstChildDates = lstchilddates; connection.Close(); } } catch (Exception ex) { throw; } return(lstdtes); }
/// <summary> /// Method to get Joint Working Dates /// </summary> /// <param name="parentuserCode"></param> /// <param name="parentuserName"></param> /// <param name="childuserCode"></param> /// <param name="childuserName"></param> /// <returns></returns> public JointWorkingDatesModel GetJointWorkingDates(string companyCode, string parentuserCode, string parentuserName, string childuserCode, string childuserName, string startDate, string endDate) { JointWorkingDatesModel lstdtes = null; try { DAL_ICE objdtes = new DAL_ICE(); lstdtes = objdtes.GetJointWorkingDates(companyCode, parentuserCode, parentuserName, childuserCode, childuserName, startDate, endDate); } catch (Exception ex) { throw; } return(lstdtes); }