public JsonResult WorkListInfoEdit(string str, int projectId, string name, int id) { ResultInfo result = new ResultInfo(); var account = CookieOperate.AccountCookie; var list = JsonConvert.DeserializeObject <List <WorkListEdit> >(str); var project = ProjectManageDBOperate.GetModelById(projectId); var cusMember = CustomerMemberDBOperate.GetModelById(account.AccountId); var workList = new WorkList() { ProjectId = projectId, ProjectName = project.Name, CompanyId = CommonMethod.GetInt(ConfigSetting.eeeYoooId), CompanyName = ConfigSetting.eeeYoooName, CusMemberId = account.AccountId, CusCompanyId = cusMember.CusCompanyId, Name = name, Id = id, Status = WorkListStatusEnum.NotStart.ToString(), Guid = Guid.NewGuid().ToString(), CreateBy = account.AccountName }; var flag = WorkListBLL.AddWorkList(workList, list); if (flag) { result.Message = "操作成功"; result.IsSuccess = true; } else { result.Message = "操作成功"; } return(Json(result)); }
public JsonResult GetMemberInfo() { var info = new ResultInfo <CustomerMember>(); var account = CookieOperate.AccountCookie; var id = account.AccountId; var data = CustomerMemberDBOperate.GetModelById(id); info.IsSuccess = true; info.Data = data; return(Json(info)); }
public JsonResult ProjectManageAddModel(ProjectManage model) { ResultInfo info = new ResultInfo(); var flag = false; var user = CookieOperate.AccountCookie; var cusMember = CustomerMemberDBOperate.GetModelById(user.AccountId); model.CusCompanyId = cusMember.CusCompanyId; model.FullName = model.Name; model.EndTime = DateTime.MaxValue; model.CusMemberId = user.AccountId; model.PayWay = ProjectPayWayEnum.UnKnown.ToString(); model.Status = ProjectStatusEnum.NotStart.ToString(); model.CreateBy = user.Mobile; model.CreateDate = DateTime.Now; model.RelStartTime = model.StartTime; model.RelEndTime = model.EndTime; model.LastPayDate = model.EndTime; model.CompanyId = CommonMethod.GetInt(ConfigSetting.eeeYoooId); model.Source = SourceEnum.PC.ToString(); if (model.Id <= 0) { flag = ProjectManageDBOperate.AddProjectManage(model); info.IsSuccess = flag; if (flag) { info.Message = "保存成功"; } } else { flag = ProjectManageDBOperate.ModifyProjectManage(model); info.IsSuccess = flag; if (flag) { info.Message = "保存成功"; } } return(Json(info)); }
public JsonResult SaveMemberInfo(CustomerMember member) { var info = new ResultInfo(); var account = CookieOperate.AccountCookie; var id = account.AccountId; var data = CustomerMemberDBOperate.GetModelById(id); if (member.Sex != "") { data.Sex = member.Sex; } if (member.Name != "") { data.Name = member.Name; account.AccountName = member.Name; } if (member.Job != "") { data.Job = member.Job; } if (member.Email != "") { data.Email = member.Email; account.Email = member.Email; } if (member.Mobile != "") { data.Mobile = member.Mobile; account.Mobile = member.Mobile; } info.IsSuccess = CustomerMemberDBOperate.ModifyCustomerMember(data); AccountDBOperate.ModifyAccount(account); if (info.IsSuccess) { info.Message = "修改成功"; } else { info.Message = "修改失败"; } return(Json(info)); }