/// <summary> /// 查询具体的信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public void GetView() { var id = PageRequest.GetInt("ID", 0); var dt = BllServices.GetModel(id); var json = PluSoft.Utils.JSON.Encode(dt); Response.Write(json); }
/// <summary> /// 检查修改账号的层次是否是自己的账号 /// </summary> public void Checkedself() { var selectUserId = PageRequest.GetInt("SelectUserId", 0); if (Account.GetLoginUserID() == selectUserId) { Response.Write("不能修改自己的层次!"); } }
public void GetView() { int id = PageRequest.GetInt("id", 0); var dt = new Sys.BLL.Orders().GetOrderByOrderId(id); var data = MyDBUtils.DataTable2ArrayList(dt); var htData = data.Count > 0 ? (Hashtable)data[0] : null; var json = PluSoft.Utils.JSON.Encode(htData); Response.Write(json); }
//============================================================= /// <summary> /// 查询具体的信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public void GetView() { var id = PageRequest.GetInt("ContactId", 0); var dt = new Sys.BLL.AdminRole().GetTableModel(id); var data = MyDBUtils.DataTable2ArrayList(dt); var user = data.Count > 0 ? (Hashtable)data[0] : null; var json = PluSoft.Utils.JSON.Encode(user); Response.Write(json); }
/// <summary> /// 查询具体的信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public void GetView() { var id = PageRequest.GetInt("ID", 0); var dt = new SysIpBlock().GetModel(id); //var data = MyDBUtils.DataTable2ArrayList(dt); //var user = data.Count > 0 ? (Hashtable)data[0] : null; var json = PluSoft.Utils.JSON.Encode(dt); Response.Write(json); }
/// <summary> /// 查询具体的信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public void GetView() { var id = PageRequest.GetInt("id", 0); var dt = new Sys.BLL.UserInfo().GetUserInfoById(id); var data = MyDBUtils.DataTable2ArrayList(dt); var user = data.Count > 0 ? (Hashtable)data[0] : null; var json = PluSoft.Utils.JSON.Encode(user); Response.Write(json); Response.End(); }
/// <summary> /// 查询具体的信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public void GetView() { var id = PageRequest.GetInt("FlagId", 0); var dt = new Sys.BLL.EquipmentModel().GetEqpModelInfo("e1.ModelId=" + id); var data = MyDBUtils.DataTable2ArrayList(dt); var user = data.Count > 0 ? (Hashtable)data[0] : null; var json = PluSoft.Utils.JSON.Encode(user); Response.Write(json); Response.End(); }
public void PasswordUpdateInit() { var id = PageRequest.GetInt("id", 0); var model = new Sys.BLL.UserInfo().GetModel(id); var json = string.Empty; if (model != null) { json = PluSoft.Utils.JSON.Encode(model); } Response.Write(json); }
/// <summary> /// 查询 /// </summary> public void SearchData() { //查询条件 var key = Utils.SqlStringFormat(PageRequest.GetString("key"), 2); var userType = PageRequest.GetString("userType"); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1) + 1; var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " u." + sortField + " " + sortOrder; } else { order += " u.createtime desc"; } var strWhere = "1=1"; if (!string.IsNullOrEmpty(userType)) { strWhere += " and u.RoleId=" + userType; } if (!string.IsNullOrEmpty(key)) { strWhere += " and charIndex('" + key + "',u.UserName) > 0"; } if (pageSize == 1) { pageSize = 100; } var dt = new Sys.BLL.UserInfo().GetListForMoreTable(pageSize, pageIndex, strWhere, order); var dataAll = MyDBUtils.DataTable2ArrayList(dt); var result = new Hashtable(); result["data"] = dataAll; var total = new Sys.BLL.Common().GetCount("UserInfo u", strWhere); result["total"] = total; //JSON var json = PluSoft.Utils.JSON.Encode(result); Response.Write(json); }
/// <summary> /// 查询 /// </summary> /// public void SearchData() { //查询条件 var key = Utils.SqlStringFormat(PageRequest.GetString("key"), 2); var begtime = Utils.SqlStringFormat(PageRequest.GetString("begtime"), 2); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1); var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " " + sortField + " " + sortOrder; } else { order += " createtime desc"; } var strWhere = "1=1"; if (key != "") { strWhere += " and charIndex('" + key + "',NewsTitle) > 0"; } if (begtime.Length > 0) { strWhere += " and DATEDIFF(day,'" + DateTime.Parse(begtime) + "',createtime)=0"; } var dt = BllNews.GetTable(pageSize, pageIndex, strWhere, order); var dataAll = MyDBUtils.DataTable2ArrayList(dt); var result = new Hashtable(); result["data"] = dataAll; var total = new Common().GetCount("News", strWhere); result["total"] = total; var json = PluSoft.Utils.JSON.Encode(dataAll); Response.Write(json); }
/// <summary> /// 查询 /// </summary> public void SearchData() { //查询条件 var key = Utils.SqlStringFormat(PageRequest.GetString("key"), 2); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1); var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " " + sortField + " " + sortOrder; } else { order += " createtime desc"; } var strWhere = ""; if (key != "") { strWhere += "charIndex('" + key + "',FlagName) > 0"; } if (pageSize == 1) { pageSize = 1000; } var dt = new Sys.BLL.AdminFlag().GetTable(-1, -1, strWhere, order); var dataAll = MyDBUtils.DataTable2ArrayList(dt); var result = new Hashtable(); result["data"] = dataAll; //var total = new Sys.BLL.Common().GetCount("Sys_Flag", strWhere); //result["total"] = total; //JSON var json = PluSoft.Utils.JSON.Encode(dataAll); Response.Write(json); //var tempstring = "[{\"FlagId\": \"1\",\"FlagName\": \"项目范围规划\",\"Duration\": 8,\"Start\": \"2007-01-01T00:00:00\",\"Finish\": \"2007-01-10T00:00:00\",\"PercentComplete\": 0,\"Summary\": 1,\"Critical\": 0,\"Milestone\": 0,\"PredecessorLink\": [],\"ParentId\": -1},{\"FlagId\": \"2\",\"FlagName\": \"确定项目范围\",\"Duration\": 1,\"Start\": \"2007-01-01T00:00:00\",\"Finish\": \"2007-01-01T23:23:59\",\"PercentComplete\": 30,\"Summary\": 0,\"Critical\": 0,\"Milestone\": 0,\"PredecessorLink\": [],\"ParentId\": \"1\"}]"; //Response.Write(tempstring); }
public void StatusInit() { var id = PageRequest.GetInt("id", 0); var model = new Sys.BLL.UserInfo().GetModel(id); var json = string.Empty; if (model != null) { var userId = model.UserId; var memberModel = new Sys.BLL.Member().GetModel(userId); json = PluSoft.Utils.JSON.Encode(memberModel); } Response.Write(json); }
public void DelOrder() { int id = PageRequest.GetInt("id", 0); var bll = new Sys.BLL.Orders(); if (bll.DeleteOrders(id)) { Response.Write("1"); } else { Response.Write("0"); } }
/// <summary> /// 订单分配查询, /// </summary> /// public void SearchDataDistrbution() { Loginadmin = BllAdmin.GetModel(Account.GetLoginUserID()); if (Loginadmin == null) { return; } //查询条件 var key = Utils.SqlStringFormat(PageRequest.GetString("key"), 2); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1); var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " " + sortField + " " + sortOrder; } else { order += " createtime desc"; } var strWhere = "1=1"; if (key != "") { strWhere += " and charIndex('" + key + "',UserName) > 0"; } // strWhere += " and charIndex('" + Loginadmin.UserId + "',parentUserIDs) > 0 or UserId=" + Loginadmin.UserId + ""; strWhere += " and RoleIDs='89'"; var dt = new Admin().GetTable(-1, -1, strWhere, order); var dataAll = MyDBUtils.DataTable2ArrayList(dt); var result = new Hashtable(); result["data"] = dataAll; var json = PluSoft.Utils.JSON.Encode(dataAll); Response.Write(json); }
/// <summary> /// 查询 /// </summary> public void SearchDatat() { //查询条件 var key = Utils.SqlStringFormat(PageRequest.GetString("key"), 2); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1); var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " " + sortField + " " + sortOrder; } else { order += " OrderID"; } const string strWhere = "IsNav=1"; var dt = new AdminFlag().GetTable(-1, -1, strWhere, order); var tempDt = dt.Clone(); foreach (DataRow model in dt.Rows) { if (ManageHelper.CheckAdminHavePower(model["Flag"].ToString())) { tempDt.Rows.Add(model.ItemArray); } } var dataAll = MyDBUtils.DataTable2ArrayList(tempDt); var result = new Hashtable(); result["data"] = dataAll; var json = PluSoft.Utils.JSON.Encode(dataAll); Response.Write(json); }
public void GetOrderFlow() { int id = PageRequest.GetInt("orderId", 0); var dt = new Sys.BLL.OrderStatusFlow().GetList("OrderId=" + id).Tables[0]; if (dt != null) { DataView dv = dt.DefaultView; dv.Sort = "FlowId desc"; dt = dv.ToTable(); } var json = PluSoft.Utils.JSON.Encode(dt); Response.Write(json); }
public void SearchData() { //查询条件 int BlockType = PageRequest.GetInt("BlockType", 0);//限制方式 0白名单 1黑名单 //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1) + 1; var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " " + sortField + " " + sortOrder; } else { order += " createtime desc"; } //业务层:数据库操作 var strWhere = "1=1"; strWhere += " and BlockType=" + BlockType; var dt = BllIpBlock.GetTable(pageSize, pageIndex, strWhere, order); var dataAll = MyDBUtils.DataTable2ArrayList(dt); var result = new Hashtable(); result["data"] = dataAll; var total = new Common().GetCount("SysIpBlock", strWhere); result["total"] = total; //JSON var json = PluSoft.Utils.JSON.Encode(result); Response.Write(json); }
public void GetOrderType() { int orderId = PageRequest.GetInt("orderId", 0); var dt = new Sys.BLL.OrderType().GetList("OrderId=" + orderId).Tables[0]; //产品类型显示优化 if (dt != null) { foreach (DataRow row in dt.Rows) { if (row["ProductType"].ToString().Equals("1")) { row["ModelId"] = DBNull.Value; row["ModelName"] = ""; row["ModelNum"] = DBNull.Value; } if (row["ProductType"].ToString().Equals("2")) { row["MainModelId"] = DBNull.Value; row["MainModelName"] = ""; row["MainModelNum"] = DBNull.Value; row["SubModelId1"] = DBNull.Value; row["SubModelName1"] = ""; row["SubModelNum1"] = DBNull.Value; row["SubModelId2"] = DBNull.Value; row["SubModelName2"] = ""; row["SubModelNum2"] = DBNull.Value; row["SubModelId3"] = DBNull.Value; row["SubModelName3"] = ""; row["SubModelNum3"] = DBNull.Value; row["SubModelId4"] = DBNull.Value; row["SubModelName4"] = ""; row["SubModelNum4"] = DBNull.Value; } } dt.AcceptChanges(); } var json = PluSoft.Utils.JSON.Encode(dt); Response.Write(json); }
public void DelFlag() { var flagId = PageRequest.GetInt("FlagId", 0); if (flagId > 0) { var tem = new AdminFlag().Delete(flagId); if (tem <= 0) { Response.Write(""); } else { Response.Write(tem); } } }
/// <summary> /// 查询 /// </summary> public void SearchData() { //查询条件 var key = Utils.SqlStringFormat(PageRequest.GetString("key"), 2); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1); var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") sortOrder = "asc"; order = " " + sortField + " " + sortOrder; } else { order += " createtime desc"; } var strWhere = ""; if (key != "") { strWhere += "charIndex('" + key + "',FlagName) > 0"; } if (pageSize == 1) { pageSize = 1000; } var dt = new Sys.BLL.NewsType().GetTable(-1, -1, strWhere, order); var dataAll = MyDBUtils.DataTable2ArrayList(dt); var result = new Hashtable(); result["data"] = dataAll; //var total = new Sys.BLL.Common().GetCount("Sys_Flag", strWhere); //result["total"] = total; //JSON var json = PluSoft.Utils.JSON.Encode(dataAll); Response.Write(json); }
private void Save() { var model = BllAdmin.GetModel(PageRequest.GetInt("UserId", 0)); if (model != null) { model.PlusFlag = PageRequest.GetString("RoleFlag");//获取新的权限 model.UserFlag = model.RoleFlags + "," + model.PlusFlag; model.UserFlag = model.UserFlag.Replace(",,", ","); BllAdmin.UpdateForPlusSysRoleFlag(model); Response.Write("yes"); } else { Response.Write(""); } Response.End(); }
/// <summary> /// 删除 /// </summary> public void DelFlag() { var flagId = PageRequest.GetInt("FlagId", 0); if (flagId > 0) { var dt = new Sys.BLL.EquipmentModel().GetList("ParentModelId=" + flagId).Tables[0]; if (dt != null && dt.Rows.Count > 0) { Response.Write("0"); } else { var result = new Sys.BLL.EquipmentModel().Delete(flagId); if (result) { Response.Write("1"); } } } }
/// <summary> /// 查询 /// </summary> public void SearchData() { //查询条件 var key = Utils.SqlStringFormat(PageRequest.GetString("key"), 2); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1); var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " " + sortField + " " + sortOrder; } else { order += " ModelId desc"; } var strWhere = ""; if (pageSize == 1) { pageSize = 10000; } var dt = new Sys.BLL.EquipmentModel().GetList(pageSize, pageIndex, strWhere, order); var json = Midea.Common.JsonHelper.ObjectToJson(dt); Response.Write(json); Response.End(); }
/// <summary> /// 登陆 /// </summary> private void UserLogin() { //URL登陆定向,涉及SSO登陆 if (url.Length > 7 && url.Substring(0, 7) == "http://") { url = ""; } else { url = Utils.UrlEncode(url); } //用户名字段判断 if (username == "") { Response.Redirect("login.aspx?url=" + url + "&errmsg=帐户为空,请重新输入!&username="******"") { Response.Redirect("login.aspx?url=" + url + "&errmsg=密码为空,请重新输入!&username="******"") // Response.Redirect("login.aspx?url=" + url + "&errmsg=验证码为空,请重新输入!&username="******"ValidateCode"].Value.ToLower()) // Response.Redirect("login.aspx?url=" + url + "&errmsg=验证码不正确,请重新输入!&username="******"WebConfig", "AdminIpBlockType", 0); switch (AdminIpBlockType) { case 0: break; case 1: { var bllIpBlock = new Sys.BLL.SysIpBlock(); if (bllIpBlock.Exists(0, 1, Utils.GetRealIP())) { Response.Redirect("login.aspx?url=" + url + "&errmsg=当前IP被限制登录系统后台!&username="******"login.aspx?url=" + url + "&errmsg=当前IP被限制登录系统后台!&username="******"login.aspx?url=" + url + "&errmsg=帐户不存在!&username="******"login.aspx?url=" + url + "&errmsg=密码不正确!&username="******"login.aspx?url=" + url + "&errmsg=该账户无权登陆系统!&username="******"login.aspx?url=" + url + "&errmsg=该账户禁止登陆系统!&username="******"login.aspx?url=" + url + "&errmsg=该账户无权登陆系统后台!&username="******"login.aspx?url=" + url + "&errmsg=该账户禁止登陆系统后台!&username="******"managelogin", "登陆成功"); //Cookie保存-帐户 Sys.BLL.Admin.SetUsername(modelAdmin.Username); //Cookie保存-姓名 Sys.BLL.Admin.SetRealName(modelAdmin.RealName); //Cookie保存-rememberme if (PageRequest.GetInt("rememberme", 0) == 1) { Utils.WriteCookie("manage_LoginName", Utils.UrlEncode(username), 518400, ConfigHelper.GetConfigString("CookieDomain")); } if (modelAdmin.Username == modelAdmin.RealName) { Response.Redirect("main.aspx?url=" + Utils.UrlEncode("user/profile.aspx")); } else if (url != "") { Response.Redirect("main.aspx?url=" + Utils.UrlEncode(url)); } else { Response.Redirect("main.aspx"); } }
/// <summary> /// 查询 /// </summary> public void SearchData() { //查询条件 var orderStatus = PageRequest.GetString("orderStatus"); var projectName = PageRequest.GetString("projectName"); var cmbDate = PageRequest.GetString("cmbDate"); //分页 var pageIndex = PageRequest.GetInt("pageIndex", 1) + 1; var pageSize = PageRequest.GetInt("pageSize", 1); //字段排序 var sortField = PageRequest.GetString("sortField"); var sortOrder = PageRequest.GetString("sortOrder"); var order = ""; if (String.IsNullOrEmpty(sortField) == false) { if (sortOrder != "desc") { sortOrder = "asc"; } order = " u." + sortField + " " + sortOrder; } else { order += " CreateDate desc"; } var strWhere = "1=1"; if (!string.IsNullOrEmpty(orderStatus)) { if (orderStatus.Equals("0")) { strWhere += " and OrderStatus is null"; } else { strWhere += " and OrderStatus=" + orderStatus; } } if (!string.IsNullOrEmpty(projectName)) { strWhere += string.Format(" and ProjectName like '%{0}%' ", DataSecurity.FilterBadChar(projectName)); } if (!string.IsNullOrEmpty(cmbDate)) { //1day,3day,1week,1month,halfyear,oneyear if (cmbDate.Equals("1day")) { strWhere += " and CreateDate>=DATEADD(DAY,-1,GETDATE())"; } else if (cmbDate.Equals("3day")) { strWhere += " and CreateDate>=DATEADD(DAY,-3,GETDATE())"; } else if (cmbDate.Equals("1week")) { strWhere += " and CreateDate>=DATEADD(DAY,-7,GETDATE())"; } else if (cmbDate.Equals("1month")) { strWhere += " and CreateDate>=DATEADD(DAY,-30,GETDATE())"; } else if (cmbDate.Equals("halfyear")) { strWhere += " and CreateDate>=DATEADD(DAY,-180,GETDATE())"; } else if (cmbDate.Equals("oneyear")) { strWhere += " and CreateDate>=DATEADD(DAY,-365,GETDATE())"; } } if (pageSize == 1) { pageSize = 100; } var dt = new Sys.BLL.Orders().GetListForMoreTable(pageSize, pageIndex, strWhere, order); var dataAll = MyDBUtils.DataTable2ArrayList(dt); var result = new Hashtable(); result["data"] = dataAll; var total = new Sys.BLL.Common().GetCount("Orders o", strWhere); result["total"] = total; //JSON var json = PluSoft.Utils.JSON.Encode(result); Response.Write(json); }