Exemple #1
0
 public List <tbl_LeaveApproval> GetMulitpleEmployeeDetails(string strLeaveReqID)
 {
     try
     {
         DALBase obj = new DALBase(_config);
         List <tbl_LeaveApproval> listObj  = new List <tbl_LeaveApproval>();
         tbl_LeaveApproval        objLeave = new tbl_LeaveApproval();
         DataSet   ds = obj.GetMulipleDataBYId(ConstantStoredProcedure.SP_BCL_GETEMPDETAILS_Muliple, strLeaveReqID);
         DataTable dt = ds.Tables[0];
         if (dt != null)
         {
             if (dt.Rows.Count > 0)
             {
                 foreach (DataRow dtRow in dt.Rows)
                 {
                     var objLeaverequestid = dtRow[0].ToString();
                     var objEmployeeID     = dtRow[1].ToString();
                     objLeave = new tbl_LeaveApproval();
                     objLeave.LeaveRequestId = Convert.ToInt32(objLeaverequestid);
                     objLeave.EmployeeID     = objEmployeeID;
                     objLeave.FromDate       = Convert.ToDateTime(dtRow[2]);
                     objLeave.FromDateString = objLeave.FromDate.ToString("dd/MM/yyyy");
                     objLeave.ToDate         = Convert.ToDateTime(dtRow[3]);
                     objLeave.ToDateString   = objLeave.ToDate.ToString("dd/MM/yyyy");
                     objLeave.TotalLeaves    = Convert.ToDouble(dtRow[4]);
                     objLeave.LeaveShift     = dtRow[5].ToString();
                     objLeave.LeaveCode      = dtRow[6].ToString();
                     objLeave.OldStatus      = dtRow[9].ToString();
                     objLeave.LeaveId        = Convert.ToInt32(dtRow[10]);
                     objLeave.empmobileno    = Convert.ToString(dtRow[11]);
                     objLeave.LeaveCategory  = Convert.ToString(dtRow[12]);
                     listObj.Add(objLeave);
                 }
             }
         }
         return(listObj);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }