public ActionResult Edit(PM_WorkLog worklog) { PM_WorkLogBL bal = new PM_WorkLogBL(); var id = Session["user"]; var userId = (LoginInformation)id; worklog.UserId = Convert.ToInt64(userId.UserId); var result = bal.Manage("EditWorkLog", worklog); return(Json(result, JsonRequestBehavior.AllowGet)); }
public HttpResponseMessage New(PM_WorkLog worklog) { PM_WorkLogBL bal = new PM_WorkLogBL(); var result = bal.Manage("INSERT_WorkLog", worklog); if (result) { return(this.Request.CreateResponse(HttpStatusCode.OK, new { Message = "WorkLog added", Value = 1 })); } else { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "WorkLog not added")); } }
public bool ApproveWorklog(string Filter, Int32 WLogId, bool IsApproved) { try { PM_WorkLog wlog = new PM_WorkLog(); PM_WorkLogBL dal = new PM_WorkLogBL(); var id = Session["user"]; var userId = (LoginInformation)id; wlog.WLogId = WLogId; wlog.UserId = Convert.ToInt64(userId.UserId); wlog.LogDate = DateTime.Now; // ApprovalDate is sent in "@LogDate" Parameter wlog.IsApproved = IsApproved; dal.Manage(Filter, wlog); return(true); } catch { return(false); } }
public bool Manage(string Filter, PM_WorkLog worklog) { return(dal.Manage(Filter, worklog.WLogId, worklog.ProjectId, worklog.ProjectSiteId, worklog.TaskId, worklog.IssueId, worklog.LogType, worklog.UserId, worklog.LogDate, worklog.LogHours, worklog.Description, worklog.IsApproved)); }