Exemplo n.º 1
0
        // GET: User/UserInfo
        public ActionResult Index()
        {
            LoadData();

            #region  拉框绑定
            var userTypeList = CodeBLL.GetCodeListByParentCode("RYLX");
            var listItems    = new List <ListItem>();
            listItems.Add(new ListItem
            {
                Text  = "全部",
                Value = "-1"
            });
            foreach (var d in userTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var userType = new DropDownListModel();
            userType.DropDownList     = "VALUE";
            userType.DropDownListItem = listItems;

            #endregion
            UserInfoModel model = new UserInfoModel();
            model.userType = userType;
            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult Add()
        {
            #region  拉框绑定
            var belongDeptList = CodeBLL.GetCodeListByParentCode("PCS");
            var listItems      = new List <ListItem>();
            foreach (var d in belongDeptList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var model = new DropDownListModel();
            model.DropDownList     = "VALUE";
            model.DropDownListItem = listItems;
            #endregion

            return(View(model));
        }
Exemplo n.º 3
0
        public ActionResult NetDetail()
        {
            var id = Convert.ToInt32(Request.QueryString["id"]);

            #region  拉框绑定
            var belongDeptList = CodeBLL.GetCodeListByParentCode("PCS");
            var listItems      = new List <ListItem>();
            foreach (var d in belongDeptList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var model = new DropDownListModel();
            model.DropDownList     = "VALUE";
            model.DropDownListItem = listItems;
            #endregion

            var data = NetManageBLL.Get(id);
            //UIHelper.DropDownList("").SelectedValue("");
            NetInfoModel info = new NetInfoModel();
            info.dropDownList           = model;
            info.netInfo.Id             = data.ID;
            info.netInfo.Name           = data.NAME;
            info.netInfo.BelongDeptId   = data.BELONGDEPTID;
            info.netInfo.PopulationInfo = data.POPULATIONINFO;
            info.netInfo.HouseInfo      = data.HOUSEINFO;
            info.netInfo.BelongArea     = data.BELONGAREA;
            info.netInfo.UnitStoreInfo  = data.UNITSTOREINFO;
            info.netInfo.NetColor       = data.NETCOLOR;
            info.netInfo.LonAndLat      = data.LONANDLAT;
            info.netInfo.Remark         = data.REMARK;
            return(View(info));
        }
Exemplo n.º 4
0
        public ActionResult Add()
        {
            #region  拉框绑定
            var belongDeptList = CodeBLL.GetCodeListByParentCode("SSBM_RY");
            var listItems      = new List <ListItem>();
            foreach (var d in belongDeptList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var belongDept = new DropDownListModel();
            belongDept.DropDownList     = "VALUE";
            belongDept.DropDownListItem = listItems;

            var sexList = CodeBLL.GetCodeListByParentCode("XB");
            listItems = new List <ListItem>();
            foreach (var d in sexList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var sex = new DropDownListModel();
            sex.DropDownList     = "VALUE1";
            sex.DropDownListItem = listItems;

            var certificateTypeList = CodeBLL.GetCodeListByParentCode("ZJLX");
            listItems = new List <ListItem>();
            foreach (var d in certificateTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var certificateType = new DropDownListModel();
            certificateType.DropDownList     = "VALUE2";
            certificateType.DropDownListItem = listItems;

            var belongNetList = NetManageBLL.GetAll();
            listItems = new List <ListItem>();
            foreach (var d in belongNetList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.Name,
                    Value = d.Id.ToString()
                });
            }

            var belongNet = new DropDownListModel();
            belongNet.DropDownList     = "";
            belongNet.DropDownListItem = listItems;

            var userTypeList = CodeBLL.GetCodeListByParentCode("RYLX");
            listItems = new List <ListItem>();
            foreach (var d in userTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var userType = new DropDownListModel();
            userType.DropDownList     = "VALUE4";
            userType.DropDownListItem = listItems;

            var loginTypeList = CodeBLL.GetCodeListByParentCode("DLLX");
            listItems = new List <ListItem>();
            foreach (var d in loginTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var loginType = new DropDownListModel();
            loginType.DropDownList     = "VALUE5";
            loginType.DropDownListItem = listItems;
            #endregion

            UserInfoModel model = new UserInfoModel();
            model.belongDept      = belongDept;
            model.sex             = sex;
            model.certificateType = certificateType;
            model.belongNet       = belongNet;
            model.userType        = userType;
            model.loginType       = loginType;
            return(View(model));
        }
Exemplo n.º 5
0
        public ActionResult Edit()
        {
            var id = Convert.ToInt32(Request.QueryString["id"]);

            #region  拉框绑定
            var belongDeptList = CodeBLL.GetCodeListByParentCode("SSBM_RY");
            var listItems      = new List <ListItem>();
            foreach (var d in belongDeptList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var belongDept = new DropDownListModel();
            belongDept.DropDownList     = "VALUE";
            belongDept.DropDownListItem = listItems;

            var sexList = CodeBLL.GetCodeListByParentCode("XB");
            listItems = new List <ListItem>();
            foreach (var d in sexList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var sex = new DropDownListModel();
            sex.DropDownList     = "VALUE1";
            sex.DropDownListItem = listItems;

            var certificateTypeList = CodeBLL.GetCodeListByParentCode("ZJLX");
            listItems = new List <ListItem>();
            foreach (var d in certificateTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var certificateType = new DropDownListModel();
            certificateType.DropDownList     = "VALUE2";
            certificateType.DropDownListItem = listItems;

            var belongNetList = NetManageBLL.GetAll();
            listItems = new List <ListItem>();
            foreach (var d in belongNetList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.Name,
                    Value = d.Id.ToString()
                });
            }

            var belongNet = new DropDownListModel();
            belongNet.DropDownList     = "";
            belongNet.DropDownListItem = listItems;

            var userTypeList = CodeBLL.GetCodeListByParentCode("RYLX");
            listItems = new List <ListItem>();
            foreach (var d in userTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var userType = new DropDownListModel();
            userType.DropDownList     = "VALUE4";
            userType.DropDownListItem = listItems;

            var loginTypeList = CodeBLL.GetCodeListByParentCode("DLLX");
            listItems = new List <ListItem>();
            foreach (var d in loginTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var loginType = new DropDownListModel();
            loginType.DropDownList     = "VALUE5";
            loginType.DropDownListItem = listItems;
            #endregion

            UserInfoModel model = new UserInfoModel();
            model.belongDept      = belongDept;
            model.sex             = sex;
            model.certificateType = certificateType;
            model.belongNet       = belongNet;
            model.userType        = userType;
            model.loginType       = loginType;
            var data = UserBLL.Get(id);
            model.userInfo.Id              = data.ID;
            model.userInfo.Name            = data.NAME;
            model.userInfo.UserName        = data.USERNAME;
            model.userInfo.UserPwd         = data.USERPWD;
            model.userInfo.Sex             = data.SEX;
            model.userInfo.Age             = data.AGE;
            model.userInfo.Telephone       = data.TELEPHONE;
            model.userInfo.CertificateType = data.CERTIFICATETYPE;
            model.userInfo.CertificateNum  = data.CERTIFICATENUM;
            model.userInfo.BelongDeptId    = data.BELONGDEPTID;
            model.userInfo.BelongNetId     = data.BELONGNETID;
            model.userInfo.Direction       = data.DIRECTION;
            model.userInfo.Address         = data.ADDRESS;
            model.userInfo.Remark          = data.REMARK;
            model.userInfo.UserType        = data.USERTYPE;
            model.userInfo.VirtualTrumpet  = data.VIRTUALTRUMPET;
            model.userInfo.LoginType       = data.LOGINTYPE;
            return(View(model));
        }
Exemplo n.º 6
0
        public ActionResult CarDetail()
        {
            var id = Convert.ToInt32(Request.QueryString["id"]);

            #region  拉框绑定
            var belongDeptList = CodeBLL.GetCodeListByParentCode("PCS");
            var listItems      = new List <ListItem>();
            foreach (var d in belongDeptList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var belongDept = new DropDownListModel();
            belongDept.DropDownList     = "VALUE";
            belongDept.DropDownListItem = listItems;

            var vehicleTypeList = CodeBLL.GetCodeListByParentCode("CLLX");
            listItems = new List <ListItem>();
            foreach (var d in vehicleTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var vehicleType = new DropDownListModel();
            vehicleType.DropDownList     = "VALUE1";
            vehicleType.DropDownListItem = listItems;

            var belongNetList = NetManageBLL.GetAll();
            listItems = new List <ListItem>();
            foreach (var d in belongNetList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.Name,
                    Value = d.Id.ToString()
                });
            }

            var belongNet = new DropDownListModel();
            belongNet.DropDownList     = "VALUE2";
            belongNet.DropDownListItem = listItems;

            var ownerTypeList = CodeBLL.GetCodeListByParentCode("YCBM");
            listItems = new List <ListItem>();
            foreach (var d in ownerTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var ownerType = new DropDownListModel();
            ownerType.DropDownList     = "VALUE3";
            ownerType.DropDownListItem = listItems;
            #endregion
            CarInfoModel model = new CarInfoModel();
            model.belongDept  = belongDept;
            model.vehicleType = vehicleType;
            model.belongNet   = belongNet;
            model.ownerType   = ownerType;
            var data = CarBLL.GetByVehId(id);
            model.carInfo.Id           = data.Id;
            model.carInfo.VehicleNo    = data.VehicleNo;
            model.carInfo.VehicleType  = data.VehicleType;
            model.carInfo.VehicleBrand = data.VehicleBrand;
            model.carInfo.BelongDeptId = data.BelongDeptId;
            model.carInfo.BelongNetId  = data.BelongNetId;
            model.carInfo.Owner        = data.Owner;
            model.carInfo.OwnerType    = data.OwnerType;
            model.carInfo.Remark       = data.Remark;
            model.carInfo.Cldwzdsbh    = data.Cldwzdsbh;
            model.carInfo.Wlwkhm       = data.Wlwkhm;
            return(View(model));
        }
Exemplo n.º 7
0
        public ActionResult Add()
        {
            #region  拉框绑定
            var belongDeptList = CodeBLL.GetCodeListByParentCode("PCS");
            var listItems      = new List <ListItem>();
            foreach (var d in belongDeptList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var belongDept = new DropDownListModel();
            belongDept.DropDownList     = "VALUE";
            belongDept.DropDownListItem = listItems;

            var vehicleTypeList = CodeBLL.GetCodeListByParentCode("CLLX");
            listItems = new List <ListItem>();
            foreach (var d in vehicleTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var vehicleType = new DropDownListModel();
            vehicleType.DropDownList     = "VALUE1";
            vehicleType.DropDownListItem = listItems;

            var belongNetList = NetManageBLL.GetAll();
            listItems = new List <ListItem>();
            foreach (var d in belongNetList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.Name,
                    Value = d.Id.ToString()
                });
            }

            var belongNet = new DropDownListModel();
            belongNet.DropDownList     = "VALUE2";
            belongNet.DropDownListItem = listItems;

            var ownerTypeList = CodeBLL.GetCodeListByParentCode("YCBM");
            listItems = new List <ListItem>();
            foreach (var d in ownerTypeList)
            {
                listItems.Add(new ListItem
                {
                    Text  = d.BMVALUE,
                    Value = d.BMKEY.ToString()
                });
            }

            var ownerType = new DropDownListModel();
            ownerType.DropDownList     = "VALUE3";
            ownerType.DropDownListItem = listItems;
            #endregion
            CarInfoModel model = new CarInfoModel();
            model.belongDept  = belongDept;
            model.vehicleType = vehicleType;
            model.belongNet   = belongNet;
            model.ownerType   = ownerType;
            return(View(model));
        }