public string _EduFormView(jpqualification model) { jpuser SessionUser = GetSessionUser(); if (model != null) { if (SessionUser != null) { if (SessionUser.objjpprofile != null) { if (SessionUser.objjpprofile.lstjpqualification != null) { model.PROFILEID = SessionUser.objjpprofile.PROFILEID; if (model.QUALIFICATIONID == 0) { model.QUALIFICATIONID = GetTempID(SessionUser.objjpprofile.lstjpqualification); } else { jpqualification obj = SessionUser.objjpprofile.lstjpqualification.Find(a => a.QUALIFICATIONID == model.QUALIFICATIONID); if (obj != null) { SessionUser.objjpprofile.lstjpqualification.Remove(obj); } } SessionUser.objjpprofile.lstjpqualification.Add(model); return(Shared.Constants.MSG_SUCCESS.Text); } } } } return(Shared.Constants.MSG_ERROR.Text); }
public ActionResult _EduFormView(string id) { jpuser SessionUser = GetSessionUser(); if (!string.IsNullOrEmpty(id)) { if (SessionUser != null) { if (SessionUser.objjpprofile != null) { if (SessionUser.objjpprofile.lstjpqualification != null) { jpqualification obj = SessionUser.objjpprofile.lstjpqualification.Find(q => q.QUALIFICATIONID == int.Parse(id) && q.PROFILEID.Equals(SessionUser.objjpprofile.PROFILEID)); if (obj != null) { return(PartialView(obj)); } } } } } return(PartialView(new jpqualification() { isNewRecord = Shared.Constants.STR_YES })); }
public string _EduRecRemove(string id) { jpuser SessionUser = GetSessionUser(); if (!string.IsNullOrEmpty(id)) { if (SessionUser != null) { if (SessionUser.objjpprofile != null) { if (SessionUser.objjpprofile.lstjpqualification != null) { jpqualification obj = SessionUser.objjpprofile.lstjpqualification.Find(q => q.QUALIFICATIONID == int.Parse(id) && q.PROFILEID.Equals(SessionUser.objjpprofile.PROFILEID)); if (obj != null) { if (int.Parse(id) > 0) { var ret = jpqualificationManager.Deletejpqualification(obj.QUALIFICATIONID); if (ret.Equals(Shared.Constants.MSG_OK_DBSAVE.Text)) { SessionUser.objjpprofile.lstjpqualification.Remove(obj); return(Shared.Constants.MSG_SUCCESS.Text); } } else { SessionUser.objjpprofile.lstjpqualification.Remove(obj); return(Shared.Constants.MSG_SUCCESS.Text); } } } } } } return(Shared.Constants.MSG_ERROR.Text); }