/// <summary> /// 獲取用戶類型 /// </summary> public void GetUserType() { result = Vehicle_User.GetUserType(); Response.ContentType = "Application/json"; Response.Write(result); Response.End(); }
/// <summary> /// 獲取主檔 /// </summary> public void GetUserDataGrid() { rows = Request["rows"] == null ? 10 : int.Parse(Request["rows"]); page = Request["page"] == null ? 1 : int.Parse(Request["page"]); string GetDataGrid = Vehicle_User.GetUserDataGrid(rows, page); Response.ContentType = "Application/json"; Response.Write(GetDataGrid); Response.End(); }
/// <summary> /// 新增存儲 /// </summary> public void UserAddSave() { UserModel Model = new UserModel(); Model.userid = Request.Form["userid"]; Model.username = Request.Form["username"]; Model.name = Request.Form["name"]; Model.tel = Request.Form["tel"]; Model.type = Request.Form["type"]; string text = Vehicle_User.UserAddSave(Model); Response.ContentType = "Application/json"; Response.Write(text); Response.End(); }
/// <summary> /// 搜索 /// </summary> public void UserSearch() { rows = Request["rows"] == null ? 10 : int.Parse(Request["rows"]); page = Request["page"] == null ? 1 : int.Parse(Request["page"]); string username = Request.Form["username"]; string userid = Request.Form["userid"]; string name = Request.Form["name"]; string type = Request.Form["type"]; UserModel Model = new UserModel(); Model.username = username; Model.userid = userid; Model.name = name; Model.type = type; string Json = Vehicle_User.UserSearch(rows, page, Model); Response.ContentType = "Application/json"; Response.Write(Json); Response.End(); }