/// <summary>
        /// 设置默认联系人
        /// </summary>
        /// <param name="id">联系人id</param>
        /// <returns></returns>
        public Common.ClientResult.Result SetDefault(int id, int companyID)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();
            string returnValue = string.Empty;

            if (m_BLL.SetDefault(ref validationErrors, id, companyID))
            {
                LogClassModels.WriteServiceLog(Suggestion.UpdateSucceed + ",客户_企业联系人的Id为" + id, "客户_企业联系人_设置默认联系人"
                                               );//写入日志
                result.Code    = Common.ClientCode.Succeed;
                result.Message = Suggestion.UpdateSucceed;
                return(result);    //提示更新成功
            }
            else
            {
                if (validationErrors != null && validationErrors.Count > 0)
                {
                    validationErrors.All(a =>
                    {
                        returnValue += a.ErrorMessage;
                        return(true);
                    });
                }
                LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",客户_企业联系人的Id为" + id + "," + returnValue, "客户_企业联系人_设置默认联系人"
                                               );//写入日志
                result.Code    = Common.ClientCode.Fail;
                result.Message = Suggestion.UpdateFail + returnValue;
                return(result);    //提示更新失败
            }
        }
Esempio n. 2
0
        public ActionResult UpdataDH(ChuLi entity)
        {
            if (entity != null && ModelState.IsValid)
            {
                string returnValue = string.Empty;

                if (m_BLL.EditState(ref validationErrors, entity, "已打回"))
                {
                    LogClassModels.WriteServiceLog(Suggestion.UpdateSucceed + ",信息的Id为" + entity.Id, "打回"
                                                   ); //写入日志
                    return(Content("成功"));            //提示更新成功
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",信息的Id为" + entity.Id + "," + returnValue, "打回"
                                                   );                     //写入日志
                    return(Content(Suggestion.UpdateFail + returnValue)); //提示更新失败
                }
            }

            return(Content(Suggestion.InsertFail + ",请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
Esempio n. 3
0
        public ActionResult Create(SysMenuSysRoleSysOperation entity)
        {
            if (entity != null && ModelState.IsValid)
            {
                string currentPerson = GetCurrentPerson();
                // entity.CREATETIME = DateTime.Now;
                // entity.CREATEPERSON = currentPerson;

                entity.Id = Result.GetNewId();
                string returnValue = string.Empty;
                if (m_BLL.Create(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + ",菜单角色操作的信息的Id为" + entity.Id, "菜单角色操作"
                                                   );//写入日志
                    return(Json(Suggestion.InsertSucceed));
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.InsertFail + ",菜单角色操作的信息," + returnValue, "菜单角色操作"
                                                   );                  //写入日志
                    return(Json(Suggestion.InsertFail + returnValue)); //提示插入失败
                }
            }

            return(Json(Suggestion.InsertFail + ",请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
        public ActionResult Edit(int id, COST_PayRecordStatus entity)
        {
            if (entity != null && ModelState.IsValid)
            {   //数据校验
                string currentPerson = GetCurrentPerson();
                //entity.UpdateTime = DateTime.Now;
                //entity.UpdatePerson = currentPerson;

                string returnValue = string.Empty;
                if (m_BLL.Edit(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(Suggestion.UpdateSucceed + ",费用_社保支出导入汇总信息的Id为" + id, "费用_社保支出导入汇总"
                                                   );       //写入日志
                    return(Json(Suggestion.UpdateSucceed)); //提示更新成功
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",费用_社保支出导入汇总信息的Id为" + id + "," + returnValue, "费用_社保支出导入汇总"
                                                   );                  //写入日志
                    return(Json(Suggestion.UpdateFail + returnValue)); //提示更新失败
                }
            }
            return(Json(Suggestion.UpdateFail + "请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
        /// <summary>
        /// 停用中间表数据
        /// </summary>
        /// <param name="id">中间表编号</param>
        /// <returns></returns>
        public Common.ClientResult.Result PostStop(int id)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();

            string returnValue = string.Empty;

            if (id != 0)
            {
                if (m_BLL.UpdateEmployeeMiddleState(ref validationErrors, id, Common.Status.停用.ToString(), LoginInfo.UserName))
                {
                    LogClassModels.WriteServiceLog("费用中间表数据停用成功" + ",信息的Id为" + id, "消息"
                                                   );//停用成功,写入日志
                    result.Code    = Common.ClientCode.Succeed;
                    result.Message = "停用成功";
                }
            }
            else
            {
                if (validationErrors != null && validationErrors.Count > 0)
                {
                    validationErrors.All(a =>
                    {
                        returnValue += a.ErrorMessage;
                        return(true);
                    });
                }
                LogClassModels.WriteServiceLog("费用中间表数据停用失败" + ",信息的Id为" + id + "," + returnValue, "消息"
                                               );//停用失败,写入日志
                result.Code    = Common.ClientCode.Fail;
                result.Message = "停用失败" + returnValue;
            }
            return(result);
        }
Esempio n. 6
0
        // DELETE api/<controller>/5
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="collection"></param>
        /// <returns></returns>
        public Common.ClientResult.Result Delete(string query)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();

            string returnValue = string.Empty;

            string[] deleteId = query.GetString().Split(',');
            if (deleteId != null && deleteId.Length > 0)
            {
                if (m_BLL.DeleteCollection(ref validationErrors, deleteId))
                {
                    LogClassModels.WriteServiceLog(Suggestion.DeleteSucceed + ",信息的Id为" + string.Join(",", deleteId), "消息"
                                                   );//删除成功,写入日志
                    result.Code    = Common.ClientCode.Succeed;
                    result.Message = Suggestion.DeleteSucceed;
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.DeleteFail + ",信息的Id为" + string.Join(",", deleteId) + "," + returnValue, "消息"
                                                   );//删除失败,写入日志
                    result.Code    = Common.ClientCode.Fail;
                    result.Message = Suggestion.DeleteFail + returnValue;
                }
            }
            return(result);
        }
Esempio n. 7
0
 /// <summary>
 /// 审核退回新建信息
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Common.ClientResult.Result ReturnEdit(int id, string city)
 {
     Common.ClientResult.Result result = new Common.ClientResult.Result();
     if (ModelState.IsValid)
     {   //数据校验
         string returnValue = string.Empty;
         if (m_BLL.ReturnEdit(id, city))
         {
             LogClassModels.WriteServiceLog("企业社保信息审核退回成功", "企业社保信息_审核"
                                            );//写入日志
             result.Code    = Common.ClientCode.Succeed;
             result.Message = "提交成功";
             return(result); //提示更新成功
         }
         else
         {
             if (validationErrors != null && validationErrors.Count > 0)
             {
                 validationErrors.All(a =>
                 {
                     returnValue += a.ErrorMessage;
                     return(true);
                 });
             }
             LogClassModels.WriteServiceLog("企业社保信息审核退回失败", "企业社保信息_审核"
                                            );//写入日志
             result.Code    = Common.ClientCode.Fail;
             result.Message = "提交失败";
             return(result); //提示更新失败
         }
     }
     result.Code    = Common.ClientCode.FindNull;
     result.Message = "提交失败";
     return(result); //提示输入的数据的格式不对
 }
        public ActionResult Delete(FormCollection collection)
        {
            string returnValue = string.Empty;

            int[] deleteId = collection["query"].GetString().Split(',').Select(s => Convert.ToInt32(s)).ToArray();
            if (deleteId != null && deleteId.Length > 0)
            {
                if (m_BLL.DeleteCollection(ref validationErrors, deleteId))
                {
                    LogClassModels.WriteServiceLog(LogType.Operation, Suggestion.DeleteSucceed + ",信息的Id为" + string.Join(",", deleteId), "消息",
                                                   Result.Succeed);//删除成功,写入日志
                    return(Json("OK"));
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(LogType.Operation, Suggestion.DeleteFail + ",信息的Id为" + string.Join(",", deleteId) + "," + returnValue, "消息",
                                                   Result.Fail);//删除失败,写入日志
                }
            }
            return(Json(returnValue));
        }
Esempio n. 9
0
        public ActionResult Edit(string id, daily entity)
        {
            if (entity != null && ModelState.IsValid)
            {   //数据校验
                //string currentPerson = GetCurrentPerson();
                //entity.UpdateTime = DateTime.Now;
                //entity.UpdatePerson = currentPerson;

                string returnValue = string.Empty;
                if (m_BLL.Edit(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(LogType.Operation, Suggestion.UpdateSucceed + ",daily信息的Id为" + id, "daily",
                                                   Result.Succeed); //写入日志
                    return(Json(Suggestion.UpdateSucceed));         //提示更新成功
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(LogType.Operation, Suggestion.UpdateFail + ",daily信息的Id为" + id + "," + returnValue, "daily",
                                                   Result.Fail);       //写入日志
                    return(Json(Suggestion.UpdateFail + returnValue)); //提示更新失败
                }
            }
            return(Json(Suggestion.UpdateFail + "请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
Esempio n. 10
0
        public ActionResult Edit(string id, SysPerson entity)
        {
            if (entity != null && ModelState.IsValid)
            {   //数据校验
                string currentPerson = GetCurrentPerson();
                entity.UpdateTime   = DateTime.Now;
                entity.UpdatePerson = currentPerson;
                //加密
                entity.Password     = EncryptAndDecrypte.EncryptString(entity.Password);
                entity.SurePassword = entity.Password;

                string returnValue = string.Empty;
                if (m_BLL.Edit(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(Suggestion.UpdateSucceed + ",人员信息的Id为" + id, "人员"
                                                   );       //写入日志
                    return(Json(Suggestion.UpdateSucceed)); //提示更新成功
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",人员信息的Id为" + id + "," + returnValue, "人员"
                                                   );                  //写入日志
                    return(Json(Suggestion.UpdateFail + returnValue)); //提示更新失败
                }
            }
            return(Json(Suggestion.UpdateFail + "请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
Esempio n. 11
0
        public ActionResult DeleteMenu(string ids)
        {
            string returnValue = string.Empty;

            int[] deleteId = Array.ConvertAll <string, int>(ids.Split(','), delegate(string s) { return(int.Parse(s)); });
            if (ids != null && ids.Length > 0)
            {
                if (m_BLL.DeleteMenuCollection(ref validationErrors, deleteId))
                {
                    LogClassModels.WriteServiceLog(Suggestion.DeleteSucceed + ",信息的Id为" + string.Join(",", ids), "消息"
                                                   );//删除成功,写入日志

                    return(Json(new { Code = "ok", Message = Suggestion.DeleteSucceed }));
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.DeleteFail + ",信息的Id为" + string.Join(",", ids) + "," + returnValue, "消息"
                                                   );//删除失败,写入日志
                    return(Json(new { Code = "error", Message = Suggestion.DeleteFail + returnValue }));
                }
            }
            else
            {
                return(Json(new { Code = "error", Message = "未选择任何数据" }));
            }
        }
        public ActionResult Save(FormCollection collection)
        {
            string returnValue = string.Empty;

            string[] ids = collection["ids"].GetString().Split(',');
            string   id  = collection["id"].GetString();

            if (m_BLL.SaveCollection(ref validationErrors, ids, id))
            {
                LogClassModels.WriteServiceLog(Suggestion.DeleteSucceed + ",信息的Id为" + string.Join(",", ids), "消息"
                                               );//删除成功,写入日志
                return(Json("OK"));
            }
            else
            {
                if (validationErrors != null && validationErrors.Count > 0)
                {
                    validationErrors.All(a =>
                    {
                        returnValue += a.ErrorMessage;
                        return(true);
                    });
                }
                LogClassModels.WriteServiceLog(Suggestion.DeleteFail + ",信息的Id为" + string.Join(",", ids) + "," + returnValue, "消息"
                                               );//删除失败,写入日志
            }

            return(Json(returnValue));
        }
 /// <summary>
 /// 通过企业财务付款信息修改审核
 /// </summary>
 /// <param name="ID">审核表ID</param>
 /// <returns></returns>
 public Common.ClientResult.Result PassAdd(int ID)
 {
     Common.ClientResult.Result result = new Common.ClientResult.Result();
     if (ModelState.IsValid)
     {
         string returnValue = string.Empty;
         if (m_BLL.PassAdd(validationErrors, ID))
         {
             LogClassModels.WriteServiceLog("操作成功" + ",客户_企业财务付款信息_审核通过的Id为" + ID, "客户_企业财务付款信息_审核修改内容"
                                            );//写入日志
             result.Code    = Common.ClientCode.Succeed;
             result.Message = "操作成功";
             return(result); //提示更新成功
         }
         else
         {
             if (validationErrors != null && validationErrors.Count > 0)
             {
                 validationErrors.All(a =>
                 {
                     returnValue += a.ErrorMessage;
                     return(true);
                 });
             }
             LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",客户_企业财务付款信息_审核通过的Id为" + ID + "," + returnValue, "客户_企业财务付款信息_审核修改内容"
                                            );//写入日志
             result.Code    = Common.ClientCode.Fail;
             result.Message = "操作成功" + returnValue;
             return(result); //提示更新失败
         }
     }
     result.Code    = Common.ClientCode.FindNull;
     result.Message = "操作成功" + "请核对输入的数据的格式";
     return(result); //提示输入的数据的格式不对
 }
        /// <summary>
        /// 删除保存
        /// </summary>
        /// <returns></returns>
        public ActionResult Delete()
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();
            string returnValue = string.Empty;

            //string[] deleteId = query.GetString().Split(',');
            if (Request["ID"] != null)
            {
                string deleteId = Request["ID"].ToString().Trim();
                if (m_BLL.Delete(ref validationErrors, deleteId))
                {
                    LogClassModels.WriteServiceLog(Suggestion.DeleteSucceed + ",语言能力信息的Id为" + string.Join(",", deleteId), "消息"
                                                   );//删除成功,写入日志
                    result.Code    = Common.ClientCode.Succeed;
                    result.Message = Suggestion.DeleteSucceed;
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.DeleteFail + ",信息的Id为" + string.Join(",", deleteId) + "," + returnValue, "消息"
                                                   );//删除失败,写入日志
                    result.Code    = Common.ClientCode.Fail;
                    result.Message = Suggestion.DeleteFail + returnValue;
                }
            }
            return(Json(result));
        }
 /// <summary>
 /// 保存不确定度
 /// </summary>
 /// <param name="HTMLVALUE">html</param>
 /// <param name="URL">不确定计算存储地址</param>
 /// <returns></returns>
 public ActionResult JiSuanBuQueDingDuSave(string HTMLVALUE = "", string URL = "")
 {
     Common.ClientResult.Result result = new Common.ClientResult.Result();
     try
     {
         URL = GetBuQueDingDuUrl(URL);
         if (DirFile.FileExists(URL))
         {
             DirFile.DeleteFile(URL);
         }
         HTMLVALUE = Server.UrlDecode(HTMLVALUE);                                  //解码
         DirFile.SaveFile(HTMLVALUE, URL);
         LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + Url, "不确定度计算"); //写入日志
         result.Code    = Common.ClientCode.Succeed;
         result.Message = URL;
         return(Json(result)); //提示创建成功
     }
     catch (Exception ex)
     {
         LogClassModels.WriteServiceLog(Suggestion.InsertFail + Url + ":" + ex.Message, "不确定度计算");//写入日志
         result.Code    = Common.ClientCode.Fail;
         result.Message = Suggestion.InsertFail + ex.Message;
         return(Json(result)); //提示插入失败
     }
 }
        public ActionResult Create(COST_PayYiLiaoDaE entity)
        {
            if (entity != null && ModelState.IsValid)
            {
                string currentPerson = GetCurrentPerson();
                entity.CreateTime = DateTime.Now;
                //entity.CreatePerson = currentPerson;


                string returnValue = string.Empty;
                if (m_BLL.Create(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + ",费用_社保支出大病的信息的Id为" + entity.ID, "费用_社保支出大病"
                                                   );//写入日志
                    return(Json(Suggestion.InsertSucceed));
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.InsertFail + ",费用_社保支出大病的信息," + returnValue, "费用_社保支出大病"
                                                   );                  //写入日志
                    return(Json(Suggestion.InsertFail + returnValue)); //提示插入失败
                }
            }

            return(Json(Suggestion.InsertFail + ",请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
Esempio n. 17
0
 /// <summary>
 /// 启用
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Common.ClientResult.Result Start(int id, string city)
 {
     Common.ClientResult.Result result = new Common.ClientResult.Result();
     if (ModelState.IsValid)
     {   //数据校验
         string returnValue = string.Empty;
         if (m_BLL.ChangeInsuranceState(id, city, Common.Status.启用.ToString(), LoginInfo.RealName))
         {
             LogClassModels.WriteServiceLog("企业社保信息启用成功", "企业社保信息_启用"
                                            );//写入日志
             result.Code    = Common.ClientCode.Succeed;
             result.Message = "启用成功";
             return(result); //提示更新成功
         }
         else
         {
             if (validationErrors != null && validationErrors.Count > 0)
             {
                 validationErrors.All(a =>
                 {
                     returnValue += a.ErrorMessage;
                     return(true);
                 });
             }
             LogClassModels.WriteServiceLog("企业社保信息启用失败", "企业社保信息_启用"
                                            );//写入日志
             result.Code    = Common.ClientCode.Fail;
             result.Message = "启用失败";
             return(result); //提示更新失败
         }
     }
     result.Code    = Common.ClientCode.FindNull;
     result.Message = "启用失败";
     return(result); //提示输入的数据的格式不对
 }
Esempio n. 18
0
        public ActionResult Delete(FormCollection collection)
        {
            string returnValue = string.Empty;

            string[] deleteId = collection["query"].GetString().Split(',');
            if (deleteId != null && deleteId.Length > 0)
            {
                if (m_BLL.DeleteCollection(ref validationErrors, deleteId))
                {
                    LogClassModels.WriteServiceLog(Suggestion.DeleteSucceed + ",信息的Id为" + string.Join(",", deleteId), "消息"
                                                   );//删除成功,写入日志
                    App.Codes.MenuCaching.ClearCache();
                    return(Json("OK"));
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.DeleteFail + ",信息的Id为" + string.Join(",", deleteId) + "," + returnValue, "消息"
                                                   );//删除失败,写入日志
                }
            }
            return(Json(returnValue));
        }
Esempio n. 19
0
        public ActionResult Create(SysRole entity)
        {
            if (entity != null && ModelState.IsValid)
            {
                string currentPerson = GetCurrentPerson();
                entity.CreateTime   = DateTime.Now;
                entity.CreatePerson = currentPerson;

                entity.Id = Result.GetNewId();
                string returnValue = string.Empty;
                if (m_BLL.Create(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + ",角色的信息的Id为" + entity.Id, "角色"
                                                   );//写入日志
                    App.Codes.MenuCaching.ClearCache();
                    return(Json(Suggestion.InsertSucceed));
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.InsertFail + ",角色的信息," + returnValue, "角色"
                                                   );                  //写入日志
                    return(Json(Suggestion.InsertFail + returnValue)); //提示插入失败
                }
            }

            return(Json(Suggestion.InsertFail + ",请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
Esempio n. 20
0
        public ActionResult Edit(string id, SysRole entity)
        {
            if (entity != null && ModelState.IsValid)
            {   //数据校验
                string currentPerson = GetCurrentPerson();
                entity.UpdateTime   = DateTime.Now;
                entity.UpdatePerson = currentPerson;

                string returnValue = string.Empty;
                if (m_BLL.Edit(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(Suggestion.UpdateSucceed + ",角色信息的Id为" + id, "角色"
                                                   );       //写入日志
                    App.Codes.MenuCaching.ClearCache();
                    return(Json(Suggestion.UpdateSucceed)); //提示更新成功
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",角色信息的Id为" + id + "," + returnValue, "角色"
                                                   );                  //写入日志
                    return(Json(Suggestion.UpdateFail + returnValue)); //提示更新失败
                }
            }
            return(Json(Suggestion.UpdateFail + "请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
        public Common.ClientResult.Result InstUAUB([FromBody] METERING_STANDARD_DEVICE entity)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();
            if (entity != null && ModelState.IsValid)
            {
                //string currentPerson = GetCurrentPerson();
                //entity.CreateTime = DateTime.Now;
                //entity.CreatePerson = currentPerson;
                int     groups = 1;
                Account acc    = GetCurrentAccount();

                List <UNCERTAINTYTABLE> list = m_BLL.GetByRefMETERING_STANDARD_DEVICEID(entity.ID);
                var data = (from f in list select f.GROUPS).Max();
                if (data != null)
                {
                    groups = (int)data + 1;
                }
                else
                {
                    groups = 1;
                }
                string returnValue = string.Empty;
                foreach (var item in entity.UNCERTAINTYTABLE)
                {
                    item.CREATETIME   = DateTime.Now;
                    item.CREATEPERSON = acc.PersonName;
                    item.ID           = Result.GetNewId();
                    item.GROUPS       = groups;
                    if (m_BLL.Create(ref validationErrors, item))
                    {
                        LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + ",不确定度的信息的Id为" + item.ID, "不确定度"
                                                       );//写入日志
                        result.Code    = Common.ClientCode.Succeed;
                        result.Message = Suggestion.InsertSucceed;
                        //return result; //提示创建成功
                    }
                    else
                    {
                        if (validationErrors != null && validationErrors.Count > 0)
                        {
                            validationErrors.All(a =>
                            {
                                returnValue += a.ErrorMessage;
                                return(true);
                            });
                        }
                        LogClassModels.WriteServiceLog(Suggestion.InsertFail + ",不确定度的信息," + returnValue, "不确定度"
                                                       );//写入日志
                        result.Code    = Common.ClientCode.Fail;
                        result.Message = Suggestion.InsertFail + returnValue;
                        return(result); //提示插入失败
                    }
                }
                return(result);
            }

            result.Code    = Common.ClientCode.FindNull;
            result.Message = Suggestion.InsertFail + ",请核对输入的数据的格式"; //提示输入的数据的格式不对
            return(result);
        }
Esempio n. 22
0
 public ActionResult SetSysMenu(SysRole entity)
 {
     if (entity != null)
     {
         string currentPerson = GetCurrentPerson();
         entity.UpdateTime   = DateTime.Now;
         entity.UpdatePerson = currentPerson;
         string returnValue = string.Empty;
         if (m_BLL.SetSysMenu(ref validationErrors, entity))
         {
             LogClassModels.WriteServiceLog(Suggestion.UpdateSucceed + ",角色信息的Id为" + entity.Id, "消息"
                                            );       //写入日志
             return(Json(Suggestion.UpdateSucceed)); //提示更新成功
         }
         else
         {
             if (validationErrors != null && validationErrors.Count > 0)
             {
                 validationErrors.All(a =>
                 {
                     returnValue += a.ErrorMessage;
                     return(true);
                 });
             }
             LogClassModels.WriteServiceLog(Suggestion.DeleteFail + ",信息的Id为" + entity.Id + "," + returnValue, "消息"
                                            );//删除失败,写入日志
             return(Json(Suggestion.UpdateFail + returnValue));
         }
     }
     else
     {
         return(Json(Suggestion.UpdateFail + ",请核对输入的数据的格式")); //提示输入的数据的格式不对
     }
 }
Esempio n. 23
0
        public ActionResult Edit(string id, SysEmail entity)
        {
            if (entity != null && ModelState.IsValid)
            {   //数据校验
                string currentPerson = GetCurrentPerson();
                // entity.UPDATETIME = DateTime.Now;
                //entity.UPDATEPERSON = currentPerson;

                string returnValue = string.Empty;
                if (m_BLL.Edit(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(Suggestion.UpdateSucceed + ",邮件发送记录信息的Id为" + id, "邮件发送记录"
                                                   );       //写入日志
                    return(Json(Suggestion.UpdateSucceed)); //提示更新成功
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",邮件发送记录信息的Id为" + id + "," + returnValue, "邮件发送记录"
                                                   );                  //写入日志
                    return(Json(Suggestion.UpdateFail + returnValue)); //提示更新失败
                }
            }
            return(Json(Suggestion.UpdateFail + "请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
Esempio n. 24
0
        public ActionResult Create(status entity)
        {
            if (entity != null && ModelState.IsValid)
            {
                //string currentPerson = GetCurrentPerson();
                //entity.CreateTime = DateTime.Now;
                //entity.CreatePerson = currentPerson;

                entity.ID = Result.GetNewId();
                string returnValue = string.Empty;
                if (m_BLL.Create(ref validationErrors, entity))
                {
                    LogClassModels.WriteServiceLog(LogType.Operation, Suggestion.InsertSucceed + ",status的信息的Id为" + entity.ID, "status",
                                                   Result.Succeed);//写入日志
                    return(Json(Suggestion.InsertSucceed));
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(LogType.Operation, Suggestion.InsertFail + ",status的信息," + returnValue, "status",
                                                   Result.Fail);       //写入日志
                    return(Json(Suggestion.InsertFail + returnValue)); //提示插入失败
                }
            }

            return(Json(Suggestion.InsertFail + ",请核对输入的数据的格式")); //提示输入的数据的格式不对
        }
Esempio n. 25
0
        /// <summary>
        /// 锁定支出费用
        /// </summary>
        /// <param name="id">支出费用表ID</param>
        /// <returns></returns>
        public Common.ClientResult.Result LockedPayRecord(int id)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();

            string returnValue = string.Empty;

            if (m_BLL.UpdatePayRecordStatus(ref validationErrors, id, (int)Common.COST_PayRecord_Status.已锁定))
            {
                LogClassModels.WriteServiceLog("锁定成功" + ",信息的Id为" + id, "消息"
                                               );//锁定成功,写入日志
                result.Code    = Common.ClientCode.Succeed;
                result.Message = "锁定成功";
            }
            else
            {
                if (validationErrors != null && validationErrors.Count > 0)
                {
                    validationErrors.All(a =>
                    {
                        returnValue += a.ErrorMessage;
                        return(true);
                    });
                }
                LogClassModels.WriteServiceLog("锁定失败" + ",信息的Id为" + id + "," + returnValue, "消息"
                                               );//锁定失败,写入日志
                result.Code    = Common.ClientCode.Fail;
                result.Message = "锁定失败" + returnValue;
            }
            return(result);
        }
Esempio n. 26
0
        public Common.ClientResult.Result DeletePayRecord(int id)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();

            string returnValue = string.Empty;

            if (m_BLL.DeletePayRecord(ref validationErrors, id))
            {
                LogClassModels.WriteServiceLog(Suggestion.DeleteSucceed + ",信息的Id为" + id, "消息"
                                               );//作废成功,写入日志
                result.Code    = Common.ClientCode.Succeed;
                result.Message = Suggestion.DeleteSucceed;
            }
            else
            {
                if (validationErrors != null && validationErrors.Count > 0)
                {
                    validationErrors.All(a =>
                    {
                        returnValue += a.ErrorMessage;
                        return(true);
                    });
                }
                LogClassModels.WriteServiceLog(Suggestion.DeleteFail + ",信息的Id为" + id + "," + returnValue, "消息"
                                               );//作废失败,写入日志
                result.Code    = Common.ClientCode.Fail;
                result.Message = Suggestion.DeleteFail + returnValue;
            }
            return(result);
        }
Esempio n. 27
0
        public ActionResult CreateSave(Langben.DAL.DegreeSchool entity)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();
            try
            {
                if (entity != null && ModelState.IsValid)
                {
                    entity.ResumeId = CurrentResumeId;

                    entity.Id           = Result.GetNewId();
                    entity.CreateTime   = DateTime.Now;
                    entity.CreatePerson = CurrentPerson;
                    entity.State        = StateEnums.QY;
                    entity.Sort         = 0;
                    entity.UpdatePerson = CurrentPerson;
                    entity.UpdateTime   = entity.CreateTime;

                    string returnValue = string.Empty;
                    if (m_BLL.Create(ref validationErrors, entity))
                    {
                        LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + ",学历学校的信息的Id为" + entity.Id, "学历学校"
                                                       );//写入日志
                        result.Code    = Common.ClientCode.Succeed;
                        result.Message = Suggestion.InsertSucceed;
                        // return result; //提示创建成功
                    }
                    else
                    {
                        if (validationErrors != null && validationErrors.Count > 0)
                        {
                            validationErrors.All(a =>
                            {
                                returnValue += a.ErrorMessage;
                                return(true);
                            });
                        }
                        LogClassModels.WriteServiceLog(Suggestion.InsertFail + ",学历学校的信息," + returnValue, "学历学校"
                                                       );//写入日志
                        result.Code    = Common.ClientCode.Fail;
                        result.Message = Suggestion.InsertFail + returnValue;
                        // return result; //提示插入失败
                    }
                }
                else
                {
                    result.Code    = Common.ClientCode.FindNull;
                    result.Message = Suggestion.InsertFail + ",数据格式有误"; //提示输入的数据的格式不对
                    //return result;
                }
            }
            catch (Exception ex)
            {
                result.Code    = Common.ClientCode.FindNull;
                result.Message = Suggestion.InsertFail + "," + ex.Message; //提示输入的数据的格式不对
                                                                           //return result;
            }
            return(Json(result));
            //return result;
        }
Esempio n. 28
0
        public Common.ClientResult.Result SetSuccess(string stopIds, string alltype)
        {
            alltype = HttpUtility.HtmlDecode(alltype);

            IBLL.IEmployeeStopPaymentBLL m_BLL            = new BLL.EmployeeStopPaymentBLL();
            ValidationErrors             validationErrors = new ValidationErrors();

            Common.ClientResult.Result result = new Common.ClientResult.Result();
            if (!string.IsNullOrEmpty(stopIds))
            {
                string      returnValue  = string.Empty;
                SysEntities db           = new SysEntities();
                List <int>  IdList       = new List <int>();
                string[]    strArrayid   = stopIds.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                string[]    strArrayType = alltype.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                List <int?> InsuranceKindList = new List <int?>();//险种

                foreach (string id in strArrayid)
                {
                    int idd = int.Parse(id);
                    IdList.Add(idd);
                }

                foreach (var a in strArrayType)
                {
                    int InsuranceKindId = (int)(Common.EmployeeAdd_InsuranceKindId)Enum.Parse(typeof(Common.EmployeeAdd_InsuranceKindId), a);
                    InsuranceKindList.Add(InsuranceKindId);
                }

                if (SetStopPaymentSuccess(db, IdList, InsuranceKindList))
                {
                    //LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + ",员工停缴的信息的Id为" + entity.Id, "员工停缴");//写入日志
                    result.Code    = Common.ClientCode.Succeed;
                    result.Message = "保存成功!";
                    return(result); //提示创建成功
                }
                else
                {
                    if (validationErrors != null && validationErrors.Count > 0)
                    {
                        validationErrors.All(a =>
                        {
                            returnValue += a.ErrorMessage;
                            return(true);
                        });
                    }
                    LogClassModels.WriteServiceLog(Suggestion.UpdateFail + ",报减设置成功," + returnValue, "员工停缴");//写入日志
                    result.Code    = Common.ClientCode.Fail;
                    result.Message = Suggestion.UpdateFail + returnValue;
                    return(result); //提示插入失败
                }
            }

            result.Code    = Common.ClientCode.FindNull;
            result.Message = Suggestion.UpdateFail + ",请核对输入的数据的格式"; //提示输入的数据的格式不对
            return(result);
        }
Esempio n. 29
0
        public ActionResult Create(MatchResult entity)//文档上传
        {
            string msg = string.Empty;

            if (Request.Files.Count == 2)//前端获取文件选择控件值
            {
                for (int i = 0; i < Request.Files.Count; i++)
                {
                    System.Web.HttpPostedFileBase postedFile = Request.Files[i]; //获取页面选择的文件
                    UploadFiles upFiles = new UploadFiles();
                    msg = upFiles.fileSaveAsResult(postedFile);                  //上传文件
                    if (i == 0)
                    {
                        entity.BasePath     = postedFile.FileName;
                        entity.BaseFullPath = msg;
                    }
                    else
                    {
                        entity.GoldTempPath     = postedFile.FileName;
                        entity.GoldTempFullPath = msg;
                    }
                }
            }
            else
            {
                return(View());
            }
            string currentPerson = GetCurrentPerson();

            entity.CreateTime   = System.DateTime.Now;
            entity.CreatePerson = currentPerson;
            entity.Id           = Result.GetNewId();

            //excel操作
            entity.Vertion = GetVersion();
            entity.Result  = GoldMatch.Make(entity);
            string returnValue = string.Empty;

            if (m_BLL.Create(ref validationErrors, entity))
            {
                return(Redirect("/home/index"));//提示创建成功
            }
            else
            {
                if (validationErrors != null && validationErrors.Count > 0)
                {
                    validationErrors.All(a =>
                    {
                        returnValue += a.ErrorMessage;
                        return(true);
                    });
                }
                LogClassModels.WriteServiceLog(Suggestion.InsertFail + ",对比结果的信息," + returnValue, "对比结果"
                                               ); //写入日志

                return(View());                   //提示插入失败
            }
        }
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="OldID">原编号</param>
        /// <param name="RULEID">规程编号</param>
        /// <param name="SCHEMEID">方案编号</param>
        /// <param name="HTMLVALUE">html</param>
        /// <returns></returns>
        public ActionResult Save(string OldID, string RULEID, string SCHEMEID, string HTMLVALUE)
        {
            Common.ClientResult.Result result = new Common.ClientResult.Result();
            PROJECTTEMPLET             entity = new PROJECTTEMPLET();
            string currentPerson = GetCurrentPerson();

            if (string.IsNullOrWhiteSpace(currentPerson))
            {
                result.Code    = Common.ClientCode.Fail;
                result.Message = "超时,请点击右上角的 安全退出,重新登陆";
                return(Json(result)); //提示插入失败
            }
            entity.CREATETIME   = DateTime.Now;
            entity.CREATEPERSON = currentPerson;
            entity.RULEID       = RULEID;
            entity.ID           = Result.GetNewId();
            entity.SCHEMEID     = SCHEMEID;
            entity.HTMLVALUE    = Server.UrlDecode(HTMLVALUE);//解码

            PROJECTTEMPLET pEntity = m_BLL.GetModelByRULEID_SCHEMEID(RULEID, SCHEMEID);

            if (pEntity != null)
            {
                OldID = pEntity.ID;
            }
            if (OldID != null && OldID.Trim() != "")
            {
                m_BLL.Delete(ref validationErrors, OldID);
            }

            string returnValue = string.Empty;

            if (m_BLL.Create(ref validationErrors, entity))
            {
                LogClassModels.WriteServiceLog(Suggestion.InsertSucceed + ",检定项目模板的Id为" + entity.ID, "检定项目模板"
                                               );//写入日志
                result.Code = Common.ClientCode.Succeed;
                //result.Message = Suggestion.InsertSucceed;
                result.Message = entity.ID;
                return(Json(result)); //提示创建成功
            }
            else
            {
                if (validationErrors != null && validationErrors.Count > 0)
                {
                    validationErrors.All(a =>
                    {
                        returnValue += a.ErrorMessage;
                        return(true);
                    });
                }
                LogClassModels.WriteServiceLog(Suggestion.InsertFail + ",检定项目模板," + returnValue, "检定项目模板"
                                               );//写入日志
                result.Code    = Common.ClientCode.Fail;
                result.Message = Suggestion.InsertFail + returnValue;
                return(Json(result)); //提示插入失败
            }
        }