コード例 #1
0
 public ActionResult AddModuleFunction(Entities::Models.ModuleFunction instance, string id, string hidtype)
 {
     dynamic data = new System.Dynamic.ExpandoObject();
     data.one = new Entities::Models.ModuleFunction();
     if (hidtype == "add")
     {
         return PartialView(new Entities::Models.ModuleFunction());
     }
     if (hidtype == "update")
     {
         return View(_ModuleFunctionRepos.GetModuleFunctionById(id));
     }
     return PartialView(data);
 }
コード例 #2
0
        public ActionResult AddDataDictionary(Entities::Models.DataDictionary instance, string id, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            data.one = new Entities::Models.DataDictionary();
            if (hidtype == "add")
            {
                return PartialView(instance);
            }
            if (hidtype == "update")
            {

                return View(_dataDictionaryRepos.GetDataDictionaryById(id));
            }
            return PartialView(data);
        }
コード例 #3
0
        public ActionResult AddCollectionPoint(Entities::Models.CollectionPoint instance, string code, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            data.one = new Entities::Models.CollectionPoint();
            if (hidtype == "add")
            {
                return PartialView(instance);
            }
            if (hidtype == "update")
            {

                return PartialView(_CollectionPointRepos.GetCollectionPointByCode(code));
            }
            return PartialView(data);
        }
コード例 #4
0
        public ActionResult AddDepartmentList(Entities::Models.DepartmentList instance, string code, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            var emp = _employeeservice.GetEmployee();
            data.emp = emp;
            data.one = new Entities::Models.DepartmentList();
            if (hidtype == "add")
            {
                return PartialView(instance);
            }
            if (hidtype == "update")
            {

                return PartialView(_departmentListRepos.GetDepartmentListByCode(code));
            }
            return PartialView(data);
        }
コード例 #5
0
        public ActionResult saveDepartmentList(Entities::Models.DepartmentList instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    _departmentListRepos.AddService(instance);
                    LogHelper.BackInfo("004012", Masterpage.AdminCurrUser.userid, "添加部门:" + "[部门编号:" + instance.DepartmentCode + "]" + "[部门父级:" + instance.DepartmentCode_parent + "]" + "[部门名称:" + instance.DepartmentName + "]" + "[备注:" + instance.DepartmentRemark + "]" + "[员工:" + instance.EmployeeGuid + "]");
                }
                if (hidtype == "update")
                {
                    _departmentListRepos.UpdateService(instance);
                    LogHelper.BackInfo("004013", Masterpage.AdminCurrUser.userid, "修改部门:" + "[部门编号:" + instance.DepartmentCode + "]" + "[部门父级:" + instance.DepartmentCode_parent + "]" + "[部门名称:" + instance.DepartmentName + "]" + "[备注:" + instance.DepartmentRemark + "]" + "[员工:" + instance.EmployeeGuid + "]");
                }
            }
            catch
            {

            }
            return RedirectToAction("DepartmentList");
        }
コード例 #6
0
 public ActionResult saveDataDictionary(Entities::Models.DataDictionary instance, string hidtype)
 {
     if (hidtype == "add")
     {
         _dataDictionaryRepos.AddService(instance);
         LogHelper.BackInfo("1-1", Masterpage.AdminCurrUser.userid, "添加数据字典"+instance.DataDictionaryKey);
     }
     if (hidtype == "update")
     {
         _dataDictionaryRepos.UpdateService(instance);
         LogHelper.BackInfo("1-1", Masterpage.AdminCurrUser.userid, "修改数据字典" + instance.DataDictionaryKey);
     }
     return RedirectToAction("IndexData", new { first = instance.DataDictionaryKey });
 }
コード例 #7
0
        public ActionResult SaveMail(Entities::Models.EmailRecord instance, string hidmail)
        {
            try
            {

                //string Recipient = WebRequest.GetString("Recipient", true);
                //string Cc = WebRequest.GetString("Cc", true);
                //string Bcc = WebRequest.GetString("Bcc", true);
                string Recipient1 = WebRequest.GetString("Recipient1", true).Replace(",", ";");
                string Cc1 = WebRequest.GetString("Cc1", true);
                string Bcc1 = WebRequest.GetString("Bcc1", true);
                string att = WebRequest.GetString("AttachmentGuid1", true);

                //string con = WebRequest.GetString("hidmail", true);
                //Mail(Recipient1, "*****@*****.**", "ecoBio@mail", Cc1, Bcc1, instance.Title, instance.EmailContent, att);
                WebAccountHelper.SendEmail(Recipient1, instance.Title, hidmail, att);
                //Mail(Recipient1, "*****@*****.**", "zcc890213", Cc1, Bcc1, instance.Title, instance.EmailContent, att);
                instance.EmailGuid = Guid.NewGuid();
                instance.SendDate = System.DateTime.Now;
                _emailRecordRepos.AddService(instance);

            }
            catch
            {
            }
            return RedirectToAction("SendMail");
        }
コード例 #8
0
        public ActionResult saveInventory(Entities::Models.Inventory instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    instance.InventoryGuid = Guid.NewGuid();
                    _InventoryRepos.AddService(instance);
                    LogHelper.BackInfo("2-4", Masterpage.AdminCurrUser.userid, "添加客户耗材" + instance.InventoryGuid);
                }
                if (hidtype == "update")
                {
                    _InventoryRepos.UpdateService(instance);
                    LogHelper.BackInfo("2-4", Masterpage.AdminCurrUser.userid, "修改客户耗材" + instance.InventoryGuid);
                }
            }
            catch
            {

            }
            return RedirectToAction("Inventory", new { first = instance.InventoryGuid, code = instance.CustomerCode });
        }
コード例 #9
0
        public ActionResult saveCustomerConstruction(Entities::Models.CustomerConstruction instance, string hidtype)
        {
            //dynamic data = new System.Dynamic.ExpandoObject();

            //var customer = _customerRepos.GetCustomer();
            //data.customer = customer;

            //var unit = _StandardUnitRepos.GetStandardProcessUnit();
            //data.unit = unit;
            try
            {
                if (hidtype == "add")
                {

                    var str = instance.CustomerCode + "_" + (instance.StandardProcessUnitCode == null ? "0000" : instance.StandardProcessUnitCode) + "_" + instance.CustomerConstructionPositionNumber;
                    instance.CustomerConstructionPositionNumber = str;
                    _CustomerConstructionRepos.AddService(instance);
                    LogHelper.BackInfo("2-6", Masterpage.AdminCurrUser.userid, "添加客户构筑物 " + str);
                }
                if (hidtype == "update")
                {
                    _CustomerConstructionRepos.UpdateService(instance);
                }
            }
            catch
            {

            }

            return RedirectToAction("CustomerConstruction", new { first = instance.CustomerConstructionPositionNumber,code=instance.CustomerCode,unit=instance.StandardProcessUnitCode });
        }
コード例 #10
0
        public ActionResult saveCustomerCategory(Entities::Models.CustomerCategory instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    _customerCategoryRepos.AddService(instance);
                    LogHelper.BackInfo("007022", Masterpage.AdminCurrUser.userid, "添加分类权限:" + "[客户分类号:" + instance.CustomerCategoryCode + "]" + "[客户分类名称:" + instance.CustomerCategoryName + "]" + "[客户分类备注:" + instance.CustomerCategoryRemark + "]");
                }
                if (hidtype == "update")
                {
                    _customerCategoryRepos.UpdateService(instance);
                    LogHelper.BackInfo("007023", Masterpage.AdminCurrUser.userid, "修改分类权限:" + "[客户分类号:" + instance.CustomerCategoryCode + "]" + "[客户分类名称:" + instance.CustomerCategoryName + "]" + "[客户分类备注:" + instance.CustomerCategoryRemark + "]");
                }
            }
            catch
            {

            }
            return RedirectToAction("CustomerCategory");
        }
コード例 #11
0
        public ActionResult saveProcessConst(Entities::Models.ProcessConst instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    _ProcessConstRepos.AddService(instance);
                    LogHelper.BackInfo("5-10", Masterpage.AdminCurrUser.userid, "添加工艺常数"+instance.ProcessConstCode);
                }
                if (hidtype == "update")
                {
                    _ProcessConstRepos.UpdateService(instance);
                    LogHelper.BackInfo("5-10", Masterpage.AdminCurrUser.userid, "修改工艺常数" + instance.ProcessConstCode);
                }
            }
            catch
            {

            }
            return RedirectToAction("ProcessConst", new { first = instance.ProcessConstCode });
        }
コード例 #12
0
        public ActionResult SaveMSpecification(Entities::Models.MaterialSpecification instance, string hidtype,string code,string name)
        {
            //dynamic data = new System.Dynamic.ExpandoObject();
            try
            {
                if (hidtype == "add")
                {
                    instance.MaterialSpecificationDisplayNo = _MSpecificationRepos.CreateNewDisplayNo(instance.MaterialSpecificationCode, instance.MaterialSpecificationName);
                    _MSpecificationRepos.AddService(instance);
                    LogHelper.BackInfo("5-8", Masterpage.AdminCurrUser.userid, "添加耗材规格"+instance.MaterialSpecificationCode);
                }
                if (hidtype == "update")
                {
                    instance.MaterialSpecificationDisplayNo = _MSpecificationRepos.CreateNewDisplayNo(instance.MaterialSpecificationCode, instance.MaterialSpecificationName);
                    _MSpecificationRepos.UpdateService(instance);
                    LogHelper.BackInfo("5-8", Masterpage.AdminCurrUser.userid, "修改耗材规格"+instance.MaterialSpecificationCode);
                }
            }
            catch
            {

            }
            return RedirectToAction("MaterialSpecification");
            //data.one = instance;
            //return PartialView(data);
        }
コード例 #13
0
        public ActionResult SaveEquipmentSpec(Entities::Models.EquipmentSpec instance, string hidtype)
        {
            //  dynamic data = new System.Dynamic.ExpandoObject();
              //  var sup = _SupplierRepos.GetSupplier();

              //  data.sup = sup;
            try
            {
                if (hidtype == "add")
                {
                    instance.EquipmentSpecGuid = Guid.NewGuid();
                    _EquipmentSpecRepos.AddService(instance);
                }
                if (hidtype == "update")
                {
                    _EquipmentSpecRepos.UpdateService(instance);
                }
            }
            catch
            {

            }
               // data.one = instance;
               /// return PartialView(data);
            return RedirectToAction("EquipmentSpec", new { first = instance.EquipmentSpecGuid });
        }
コード例 #14
0
        public ActionResult SaveCollectionPoint(Entities::Models.CollectionPoint instance, string hidtype)
        {
            // dynamic data = new System.Dynamic.ExpandoObject();

            try
            {
                if (hidtype == "add")
                {
                    _CollectionPointRepos.AddService(instance);
                    LogHelper.BackInfo("5-4", Masterpage.AdminCurrUser.userid, "添加采集点" +instance.CollectionPointCode);
                }
                if (hidtype == "update")
                {

                    _CollectionPointRepos.UpdateService(instance);
                    LogHelper.BackInfo("5-4", Masterpage.AdminCurrUser.userid, "修改采集点"+instance.CollectionPointCode);
                }
            }
            catch
            {

            }
               // data.one = instance;
               // return PartialView(data);
            return RedirectToAction("CollectionPoint", new { first=instance.CollectionPointCode});
        }
コード例 #15
0
        public ActionResult SaveUser(Entities::Models.User instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    instance.UserGuid = Guid.NewGuid();
                    instance.UserCreateDate = DateTime.Now;
                    _userRepos.AddService(instance);
                    LogHelper.BackInfo("004022", Masterpage.AdminCurrUser.userid, "添加用户:" + "[登录标识:" + instance.UserLoginId + "[用户名:" + instance.UserChineseName + "[客户号:" + instance.CustomerCode + "[令牌号:" + instance.TokenCode + "[角色:" + instance.RoleGuid + "[用户编码:" + instance.UserGuid + "]" + "[用户手机:" + instance.UserMobile + "[用户邮箱:" + instance.UserEmail + "[用户备注:" + instance.UserRemark);

                }
                if (hidtype == "update")
                {
                    _userRepos.UpdateService(instance);
                    LogHelper.BackInfo("004023", Masterpage.AdminCurrUser.userid, "修改用户:" + "[登录标识:" + instance.UserLoginId + "[用户名:" + instance.UserChineseName + "[客户号:" + instance.CustomerCode + "[令牌号:" + instance.TokenCode + "[角色:" + instance.RoleGuid + "[用户编码:" + instance.UserGuid + "]" + "[用户手机:" + instance.UserMobile + "[用户邮箱:" + instance.UserEmail + "[用户备注:" + instance.UserRemark);
                }
                #region 增加用户客户关系
                var g = instance.RoleGuid;
                if (g == null) g = Guid.Empty;
                if (instance.RoleGuid.HasValue)
                    _userRepos.SaveUserOwerCustomer(instance.UserGuid, instance.CustomerCode, instance.RoleGuid.Value);
                else
                    _userRepos.SaveUserOwerCustomer(instance.UserGuid, instance.CustomerCode, Guid.Empty);
                #endregion
            }
            catch
            {

            }
            //data.one = instance;
            return RedirectToAction("User", new { first = instance.UserGuid });
        }
コード例 #16
0
        public ActionResult saveToken(Entities::Models.DynamicToken instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    _tokenRepos.AddService(instance);
                    LogHelper.BackInfo("007012", Masterpage.AdminCurrUser.userid, "添加令牌:" + "[令牌号:"+instance.TokenCode+"]"+"[种子码:"+instance.TokenSeed+"]"+"[备注:"+instance.TokenRemark+"]"+"[令牌许可:"+instance.TokenPermit+"]");
                }
                if (hidtype == "update")
                {
                    _tokenRepos.UpdateService(instance);
                    LogHelper.BackInfo("007013", Masterpage.AdminCurrUser.userid, "修改令牌:" + "[令牌号:" + instance.TokenCode + "]" + "[种子码:" + instance.TokenSeed + "]" + "[备注:" + instance.TokenRemark + "]" + "[令牌许可:" + instance.TokenPermit + "]");
                }

            }
            catch
            {

            }
            return RedirectToAction("DynamicToken", new { first = instance.TokenCode });
        }
コード例 #17
0
        public ActionResult SaveCustomer(Entities::Models.Customer instance, string hidtype, string OldCustomerCategoryCode)
        {
            try
            {
                if (hidtype == "add")
                {
                    _customerRepos.AddService(instance);
                    LogHelper.BackInfo("002012", Masterpage.AdminCurrUser.userid, "添加客户:" + "[客户号:" + instance.CustomerCode + "]" + "[客户名称:" + instance.CustomerFullName + "]" + "[客户父级:" + instance.CustomerGroup + "]" + "[客户分类:" + instance.CustomerCategoryCode + "]" + "[客户地址:" + instance.CustomerAddress + "]" + "[客户电话:" + instance.CustomerTel + "]" + "[客户传真:" + instance.CustomerFax + "]" + "[客户用户数:" + instance.CustomerAccountNum + "]" + "[客户DTU:" + instance.CustomerDtu + "]" + "[客户概念:" + instance.CustomerProfile + "]" + "[客户所属行业:" + instance.CustomerCode + "]" + "[客户名称:" + instance.CustomerSector + "]" + "[项目联系人:" + instance.ProjectContact + "]" + "[项目联系人电话:" + instance.ProjectContactTel + "]" + "[项目联系人手机:" + instance.ProjectContactMobile + "]" + "[项目联系人邮箱:" + instance.ProjectContactMail + "]");
                    var userrols = _roleRepos.GetDictionaryRoleList("USER_ROLE_CATEGORY");
                    // List<SelectListItem> roles1 = userrols.Select(p => new SelectListItem { Text = p.text, Value = p.value }).ToList();
                    #region 增加角色并为管理员添加权限
                    string addstr = "";
                    string del = "";
                    for (int i = 0; i < userrols.Count; i++)
                    {
                        addstr += userrols[i].text;
                        if (i != userrols.Count - 1) addstr += "#";
                    }
                    string[] addl = addstr.Split('#');
                    string[] dell = del.Split('#');
                    bool b = _roleRepos.SaveCustomerRole(instance.CustomerCode, addl, dell, true, instance.CustomerFullName);
                    if (b) LogHelper.BackInfo("2-1", Masterpage.AdminCurrUser.userid, "添加客户的角色[" + "客户号:" + instance.CustomerCode + "," + "客户名称:" + instance.CustomerFullName + "," + "角色名称:" + addstr + "]");
                    bool c = _roleRepos.SetUserAdminCustomerCategroyRighs(instance.CustomerCategoryCode, instance.CustomerCode + "_ADMIN");
                    if (c) LogHelper.BackInfo("2-1", Masterpage.AdminCurrUser.userid, "添加客户的ADMIN角色分类权限");
                    #endregion
                }
                if (hidtype == "update")
                {
                    _customerRepos.UpdateService(instance);
                    LogHelper.BackInfo("0020113", Masterpage.AdminCurrUser.userid, "修改客户:" + "[客户号:" + instance.CustomerCode + "]" + "[客户名称:" + instance.CustomerFullName + "]" + "[客户父级:" + instance.CustomerGroup + "]" + "[客户分类:" + instance.CustomerCategoryCode + "]" + "[客户地址:" + instance.CustomerAddress + "]" + "[客户电话:" + instance.CustomerTel + "]" + "[客户传真:" + instance.CustomerFax + "]" + "[客户用户数:" + instance.CustomerAccountNum + "]" + "[客户DTU:" + instance.CustomerDtu + "]" + "[客户概念:" + instance.CustomerProfile + "]" + "[客户所属行业:" + instance.CustomerCode + "]" + "[客户名称:" + instance.CustomerSector + "]" + "[项目联系人:" + instance.ProjectContact + "]" + "[项目联系人电话:" + instance.ProjectContactTel + "]" + "[项目联系人手机:" + instance.ProjectContactMobile + "]" + "[项目联系人邮箱:" + instance.ProjectContactMail + "]");
                    #region 如果改了大类,则修改分类权限
                    var oldc = _customerRepos.GetCustomerByCode(instance.CustomerCode);
                    if (OldCustomerCategoryCode != null && OldCustomerCategoryCode!=instance.CustomerCategoryCode )
                    {
                        bool a = _roleRepos.UpdateCustomerCategoryRights(instance.CustomerCode, oldc.CustomerCategoryCode, instance.CustomerCategoryCode);
                        if (a) LogHelper.BackInfo("2-1", Masterpage.AdminCurrUser.userid, "修改了客户" + instance.CustomerCode + "的分类,ADMIN权限自动变更[原来分类:" + oldc.CustomerCategoryCode + "][现为分类:" + instance.CustomerCategoryCode + "]");
                    }
                    #endregion
                }
            }
            catch
            {

            }

            return RedirectToAction("Customer", new { first = instance.CustomerCode });
        }
コード例 #18
0
        public ActionResult saveStandardTip(Entities::Models.StandardTip instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    _StandardTipRepos.AddService(instance);
                    LogHelper.BackInfo("5-7", Masterpage.AdminCurrUser.userid, "添加标准提醒"+instance.StandardTipsCode);
                }
                if (hidtype == "update")
                {
                    _StandardTipRepos.UpdateService(instance);
                    LogHelper.BackInfo("5-7", Masterpage.AdminCurrUser.userid, "修改标准提醒"+instance.StandardTipsCode);
                }
            }
            catch
            {

            }
            return RedirectToAction("StandardTip", new { first = instance.StandardTipsCode });
        }
コード例 #19
0
        public ActionResult AddCustomerBasicDataApplication(Entities::Models.CustomerBasicDataApplication instance, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            try
            {

                if (hidtype == "update")
                {
                    _BasicDataApplicationRepos.UpdateService(instance);
                    LogHelper.Info(Masterpage.AdminCurrUser.userid, "2-3:" + "客户资料申请审核," + JsonHelper.ToJson(instance));
                }
            }
            catch(Exception ex)
            {
                LogHelper.Info(Masterpage.AdminCurrUser.userid, "2-3:" + "客户资料申请审核异常," + ex.Message+",审核内容为:"+JsonHelper.ToJson(instance));
            }
            data.one = instance;
            return PartialView(data);
        }
コード例 #20
0
        public ActionResult saveStandardUnit(Entities::Models.StandardProcessUnit instance, string hidtype)
        {
            try
            {
                if (hidtype == "add")
                {
                    _StandardUnitRepos.AddService(instance);
                }
                if (hidtype == "update")
                {
                    _StandardUnitRepos.UpdateService(instance);
                }
            }
            catch
            {

            }
            return RedirectToAction("StandardProcessUnit");
        }
コード例 #21
0
        public ActionResult SaveCustomerSOP(Entities::Models.CustomerSOP instance, string hidtype, bool? CustomerSopIsBioaugmentation)
        {
            try
            {
                if (!CustomerSopIsBioaugmentation.HasValue) instance.CustomerSopIsBioaugmentation = true;
                if (hidtype == "add")
                {
                    instance.CustomerSopGuid = Guid.NewGuid();
                    instance.CustomerSopDate = DateTime.Now;
                    _CustomerSOPRepos.AddService(instance);
                    LogHelper.BackInfo("2-7", Masterpage.AdminCurrUser.userid, "添加客户SOP" + instance.CustomerSopGuid);
                }
                if (hidtype == "update")
                {
                    _CustomerSOPRepos.UpdateService(instance);
                    LogHelper.BackInfo("2-7", Masterpage.AdminCurrUser.userid, "修改客户SOP" + instance.CustomerSopGuid);
                }
            }
            catch
            {

            }

            return RedirectToAction("CustomerSOP", new { first = instance.CustomerSopGuid,code=instance.CustomerCode });
        }
コード例 #22
0
 public ActionResult SaveSupplier(Entities::Models.Supplier instance, string hidtype)
 {
     //  dynamic data = new System.Dynamic.ExpandoObject();
      try
      {
          if (hidtype == "add")
          {
              instance.SupplierGuid = Guid.NewGuid();
              _SupplierRepos.AddService(instance);
              LogHelper.BackInfo("5-9", Masterpage.AdminCurrUser.userid, "添加供应商" + instance.SupplierGuid + ":" + JsonHelper.ToJson(instance));
          }
          if (hidtype == "update")
          {
              _SupplierRepos.UpdateService(instance);
              LogHelper.BackInfo("5-9", Masterpage.AdminCurrUser.userid, "修改供应商" + instance.SupplierGuid + ":" + JsonHelper.ToJson(instance));
          }
      }
      catch (Exception ex)
      {
          LogHelper.Info(Masterpage.AdminCurrUser.userid, "5-9:" + (hidtype == "add" ? "添加供应商" : "修改供应商") + "出错:" + ex.Message + ",供应商信息:" + JsonHelper.ToJson(instance));
      }
      //  data.one = instance;
      //  return PartialView(data);
      return RedirectToAction("Supplier", new { first = instance.SupplierGuid });
 }
コード例 #23
0
        public ActionResult SaveCommunication(Entities::Models.Communication instance, string hidmessage)
        {
            try
            {
                string Recipien1 = WebRequest.GetString("Recipien1", true);
                string Title1 = WebRequest.GetString("Title1", true);
                string cons = WebRequest.GetString("EmailContent1", true);
               // string CommunicationContent = WebRequest.GetString("CommunicationContent", true);
                var a = Recipien1.Split(',');

                var ReadStatus = "";
                var senguid = "";
                for (int i = 0; i < a.Length - 1; i++)
                // var x = item.Split('|');
                {
                    senguid += a[i].ToString().Split('|')[0].Trim() + ',';
                    ReadStatus += a[i].ToString().Split('|')[1] + ',';
                }
                instance.SendGuid = ecoBio.Wms.Web.Masterpage.CurrUser.guid;
                //instance.MsgContent = cons;
                instance.Recipient = senguid;
                instance.ReadStatus = ReadStatus;
                instance.MsgGuid = Guid.NewGuid();
                instance.SendDate = System.DateTime.Now;
                instance.Title = Title1;
                instance.MsgContent = hidmessage;
                _communicationRepos.AddService(instance);

            }
            catch
            {
            }
            return RedirectToAction("SendMail");
        }
コード例 #24
0
        public ActionResult AddEquipmentKeyParameter(Entities::Models.EquipmentKeyParameter instance, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
              var con = _EquipmentKeyParameterLibRepos.GetEquipmentKeyParameterLib("设备");
              data.con = con;
              var cc = _EquipmentSpecRepos.GetEquipmentSpec();
              data.cc = cc;
              try
              {
                  if (hidtype == "add")
                  {
                      _EquipmentKeyParameterRepos.AddService(instance);
                  }
                  if (hidtype == "update")
                  {
                      _EquipmentKeyParameterRepos.UpdateService(instance);
                  }
              }
              catch
              {

              }
              data.one = instance;
              return PartialView(data);
        }
コード例 #25
0
 public ActionResult SendMail(Entities::Models.EmailRecord instance)
 {
     dynamic data = new System.Dynamic.ExpandoObject();
     data.one = new Entities::Models.EmailRecord();
     // string password= ecoBio.Wms.Web.Masterpage.CurrUser.emailpassword;
     //string key = DESHelper.GetKey();
     //string pwd = DESHelper.DESDecrypt(password, key);
     //  data.pwd = pwd;
     var use = _userRepos.GetUserAll().ToList();
     var em = _employeeservice.GetEmployee().ToList();
     List<SelectListItem> rec = use.Select(p => new SelectListItem { Text = p.UserChineseName, Value = p.UserEmail }).ToList();
     List<SelectListItem> emp = em.Select(p => new SelectListItem { Text = p.EmployeeChineseName, Value = p.EmployeeMail }).ToList();
     data.use = use;
     data.em = em;
     data.rec = rec;
     data.emp = emp;
     return View(data);
 }
コード例 #26
0
        public ActionResult AddEquipmentKeyParameterLib(Entities::Models.KeyParameter instance, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            try
            {
                if (hidtype == "add")
                {
                    instance.KeyParameterGuid = Guid.NewGuid();
                    _EquipmentKeyParameterLibRepos.AddService(instance);
                }
                if (hidtype == "update")
                {
                    _EquipmentKeyParameterLibRepos.UpdateService(instance);
                }
            }
            catch
            {

            }
            data.one = instance;
            return PartialView(data);
        }
コード例 #27
0
        public ActionResult saveModuleFunction(Entities::Models.ModuleFunction instance, string hidtype)
        {
            if (hidtype == "add")
            {
                _ModuleFunctionRepos.AddService(instance);
                LogHelper.BackInfo("1-2", Masterpage.AdminCurrUser.userid, "添加模块功能"+instance.ModuleFunctionId);
            }
            if (hidtype == "update")
            {
                _ModuleFunctionRepos.UpdateService(instance);
                LogHelper.BackInfo("1-2", Masterpage.AdminCurrUser.userid, "修改模块功能" + instance.ModuleFunctionId);

            }
            return RedirectToAction("ModuleFunction", new { first = instance.ModuleFunctionId });
        }
コード例 #28
0
        public ActionResult AddMSpecification(Entities::Models.MaterialSpecification instance, string code, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            var cc = _MSpecificationRepos.GetMaterialSpecificationList();
            data.cc = cc;
            data.one = new Entities::Models.MaterialSpecification();
            if (hidtype == "add")
            {
                return PartialView(instance);
            }
            if (hidtype == "update")
            {

                return PartialView(_MSpecificationRepos.GetMSpecificationByCode(code));
            }
            return PartialView(data);
        }
コード例 #29
0
        public ActionResult AddStandardUnit(Entities::Models.StandardProcessUnit instance, string code, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            data.one = new Entities::Models.StandardProcessUnit();
            if (hidtype == "add")
            {
                return PartialView(instance);
            }
            if (hidtype == "update")
            {

                return PartialView(_StandardUnitRepos.GetStandardUnitByCode(code));
            }
            return PartialView(data);
        }
コード例 #30
0
        public ActionResult AddToken(Entities::Models.DynamicToken instance, string code, string hidtype)
        {
            dynamic data = new System.Dynamic.ExpandoObject();
            data.one = new Entities::Models.DynamicToken();
            if (hidtype == "add")
            {
                return PartialView(instance);
            }
            if (hidtype == "update")
            {

                return PartialView(_tokenRepos.GetDynamicTokenCode(code));
            }

            return PartialView(data);
        }