/// <summary> /// Finds and return cCareerDevelopmentPlan objects matching the specified criteria /// </summary> /// <param name="i_oFilter">Filter criteria (WHERE clause)</param> /// <returns>cCareerDevelopmentPlan objects</returns> public static List <cCareerDevelopmentPlan> Find(cFilter i_oFilter) { DataTable dt = Find_DataTable(i_oFilter, null); List <cCareerDevelopmentPlan> l = new List <cCareerDevelopmentPlan>(); cCareerDevelopmentPlan oObj; for (int i = 0; i < dt.Rows.Count; i++) { oObj = new cCareerDevelopmentPlan(); oObj.m_iID = Convert.ToInt32(dt.Rows[i]["iID"]); oObj.m_sName = dt.Rows[i]["sName"].ToString(); oObj.m_dtCreatedOn = Convert.ToDateTime(dt.Rows[i]["dtCreatedOn"]); oObj.m_dtLastUpdatedOn = Convert.ToDateTime(dt.Rows[i]["dtLastUpdatedOn"]); oObj.m_sDevGoalName = Convert.ToString(dt.Rows[i]["sDevGoalName"]); oObj.m_sActionRequired = Convert.ToString(dt.Rows[i]["sActionRequired"]); oObj.m_sTracking = Convert.ToString(dt.Rows[i]["sTracking"]); oObj.m_sManagerComment = Convert.ToString(dt.Rows[i]["sManagerComment"]); oObj.m_objEmpLogin.iObjectID = Convert.ToInt32(dt.Rows[i]["objEmpLogin"].ToString()); oObj.m_objStatus.iObjectID = Convert.ToInt32(dt.Rows[i]["objStatus"].ToString()); oObj.m_bInvalid = false; l.Add(oObj); } return(l); }
/// <summary> /// Creates a cCareerDevelopmentPlan object. It will be saved in permanent storage only /// on calling Save() /// </summary> /// <returns>cCareerDevelopmentPlan object</returns> public static cCareerDevelopmentPlan Create() { cCareerDevelopmentPlan oObj = new cCareerDevelopmentPlan(); SecurityCheck((int)enCareerDevelopmentPlan_Action.Create); // Create an object in memory, will be saved to storage on calling Save() oObj.m_bCreating = true; oObj.m_bInvalid = false; return(oObj); }
/// <summary> /// Ensures that an object with the specified name exists, while creating other properties are set to their default values /// </summary> /// <param name="i_sName">Name</param> /// <returns>cCareerDevelopmentPlan object</returns> public static cCareerDevelopmentPlan CreateIfRequiredAndGet(string i_sName) { cCareerDevelopmentPlan oObj = cCareerDevelopmentPlan.Get_Name(i_sName); if (oObj == null) { oObj = cCareerDevelopmentPlan.Create(); oObj.sName = i_sName; oObj.Save(); } return(oObj); }
public ActionResult DevelopmentPlan(List <HttpPostedFileBase> file) { try { int loginID = Convert.ToInt32(HttpContext.User.Identity.Name); //FIle Upload:- if (file.Count > 0) { foreach (var item in file) { if (item != null) { cFile objfile = cFile.Create(); string filename = Path.GetFileNameWithoutExtension(item.FileName) + DateTime.Now.ToString().Replace('/', '_').Replace(':', '_') + Path.GetExtension(item.FileName); item.SaveAs((FilePath + filename)); objfile.sFileName = filename; objfile.objEmpLogin.iObjectID = loginID; objfile.objCareerDevelopmentPlan.iObjectID = 0; objfile.Save(); } } } string DevopmentPlan = Request.QueryString["DevelopmentPlan"]; List <Data> list = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Data> >(DevopmentPlan); int LoginId = Convert.ToInt32(HttpContext.User.Identity.Name); for (var i = 0; i < list.Count; i++) { cCareerDevelopmentPlan objDevPlan = cCareerDevelopmentPlan.Create(); objDevPlan.sDevGoalName = list[i].GoalName; objDevPlan.sActionRequired = list[i].Action; objDevPlan.sTracking = list[i].Tracking; objDevPlan.sManagerComment = list[i].ManagerComment; objDevPlan.objStatus.iObjectID = list[i].StatusList; objDevPlan.objEmpLogin.iObjectID = LoginId; objDevPlan.Save(); } } catch (Exception ex) { throw ex; } return(RedirectToAction("DevelopmentGoals", "QuadrantMeasures")); //return View(objQuadrantMeasure); }
public ActionResult ReviewDevelopmentGoal(QuadrantMeasuresViewModel objQuadViewModel) { try { for (int i = 0; i < objQuadViewModel.DevelopmentPlanID.Length; i++) { int ID = objQuadViewModel.DevelopmentPlanID[i]; cCareerDevelopmentPlan objDevelopmentPlan = cCareerDevelopmentPlan.Get_ID(ID); objDevelopmentPlan.sManagerComment = objQuadViewModel.ManagerComments[i]; objDevelopmentPlan.Save(); } Session["ReviewDevGoal"] = "Manager Comment added successfully."; } catch (Exception ex) { throw ex; } return(RedirectToAction("ReviewDevelopmentGoal")); }
using System;