public ActionResult btnSave_Click(FormCollection values) { CFG_NETINFO info = new CFG_NETINFO(); info.ID = Convert.ToInt32(values["Id"]); info.NAME = values["Name"]; info.BELONGDEPTID = Convert.ToInt32(values["BelongDeptId"]); info.POPULATIONINFO = values["PopulationInfo"]; info.HOUSEINFO = values["HouseInfo"]; info.BELONGAREA = values["BelongArea"]; info.UNITSTOREINFO = values["UnitStoreInfo"]; info.NETCOLOR = values["NetColor"]; info.LONANDLAT = values["LonAndLat"]; info.REMARK = values["Remark"]; var isSuccess = NetManageBLL.Update(info); ActiveWindow.HidePostBack(); if (isSuccess) { ShowNotify("数据修改成功!"); } else { ShowNotify("数据修改失败!"); } return(UIHelper.Result()); }
public ActionResult DeleteRows(JArray selectedRows, JArray NetGrid_fields, string netName, int NetGrid_pageIndex, int NetGrid_pageSize) { var ids = new List <int>(); foreach (var id in selectedRows) { ids.Add(Convert.ToInt32(id)); } var isSuccess = NetManageBLL.Delete(ids.ToArray()); if (isSuccess) { ShowNotify("数据删除成功!"); } else { ShowNotify("数据删除失败!"); } var grid1 = UIHelper.Grid("NetGrid"); var recordCount = 0; var data = NetManageBLL.GetList(netName, -1, NetGrid_pageIndex + 1, NetGrid_pageSize, out recordCount); grid1.RecordCount(recordCount); grid1.DataSource(data, NetGrid_fields); return(UIHelper.Result()); }
private void LoadData() { var recordCount = 0; var data = NetManageBLL.GetList("", -1, 1, 20, out recordCount); ViewBag.Grid1RecordCount = recordCount; ViewBag.Grid1DataSource = data; }
/// <summary> /// 获取网格信息 /// </summary> /// <returns></returns> public ActionResult GetNetInfo() { var data = NetManageBLL.GetAll(); return(new JsonResult { Data = data }); }
public ActionResult GetLonAndLat(int id) { var data = NetManageBLL.Get(id); return(new JsonResult { Data = data.LONANDLAT }); }
public ActionResult btnSearch_Click(JArray NetGrid_fields, string netName, int NetGrid_pageIndex, int NetGrid_pageSize) { var grid1 = UIHelper.Grid("NetGrid"); var recordCount = 0; var data = NetManageBLL.GetList(netName, -1, NetGrid_pageIndex + 1, NetGrid_pageSize, out recordCount); grid1.RecordCount(recordCount); grid1.DataSource(data, NetGrid_fields); return(UIHelper.Result()); }
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)); }
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)); }
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)); }
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)); }
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)); }