コード例 #1
0
 public static CommonPopupLookupManager CreatePopLookup(PopLookupTypes plt)
 {
     switch (plt)
     {
     case PopLookupTypes.CandidateDetails:
         return(new CandidateDetailPopup());
     }
     throw new System.NotSupportedException(string.Format("Lookup Type: {0} is not implemented.", plt.ToString()));
 }
コード例 #2
0
        public JsonResult ReturnData(DataTable dt, PopLookupTypes obj, int TotalRecord, char draw)
        {
            switch (obj)
            {
            case PopLookupTypes.CandidateDetails:
            {
                List <CandidateDetailViewModel> CandidateListDetails = new List <CandidateDetailViewModel>();
                CandidateListDetails = (from DataRow dr in dt.Rows
                                        select new CandidateDetailViewModel()
                    {
                        CandidateDetail_ID = Convert.ToInt32(dr["CandidateDetail_ID"]),
                        FirstName = dr["FirstName"].ToString(),
                        Lastname = dr["Lastname"].ToString(),
                        FatheFirstName = dr["FatheFirstName"].ToString(),
                        ContactMobileNo = dr["ContactMobileNo"].ToString()
                    }).ToList();
                return(Json(new { draw = draw, recordsFiltered = TotalRecord, recordsTotal = TotalRecord, data = CandidateListDetails }));
            }
            }

            return(Json(null));
        }