- 博客(19)
- 资源 (1)
- 收藏
- 关注
原创 Redis 传值
RedisClient redisClient = new RedisClient("127.0.0.1", 6379); [HttpGet] public int RedisInsert(string Key, string Value) { if (!(string.IsNullOrEmpty(Key) && string.IsNullOrEmpty(Value))) { ...
2020-08-06 19:42:54 262 1
原创 思路
public class MangeDal { //添加 public int addGoods(ManageModel m) { //写添加的sql语句 string sql = string.Format("insert into Goods(GName,GNum,GPrice,GSale,GTime,GContent,WaiJian) values('{0}','{1}','{2}','{3}','{4...
2020-08-06 19:25:29 152
原创 cookie API
<h2>AddG</h2><table> <tr> <td>账号:</td> <td><input id="name" type="text" /></td> </tr> <tr> <td>密码:</td> <td><input id="pwd"...
2020-08-06 10:27:55 184
原创 Cookie使用
//数据库连接 string str = "Data Source=.;Initial Catalog=Day14;Integrated Security=True"; Pages p = new Pages(); //添加 [HttpPost] public int Add(ModelInfo mf) { using (SqlConnection conn = new SqlCo...
2020-08-06 10:25:23 117
原创 上传图片思路
//数据库连接 string str = "Data Source=.;Initial Catalog=Day14;Integrated Security=True"; //添加 [HttpPost] public int Add(ModelInfo mf) { using (SqlConnection conn = new SqlConnection(str)) {...
2020-08-05 20:41:53 140
原创 2020-08-05
@{ ViewBag.Title = "AddG";}<h2>AddG</h2><table> <tr> <td>账号:</td> <td><input id="name" type="text" /></td> </tr> <tr> <td>密码:</td>...
2020-08-05 20:41:03 99
原创 EF MVC 显示添加修改
<h2>Index</h2><link href="~/Content/bootstrap.css" rel="stylesheet" /><script src="~/Scripts/jquery-3.3.1.js"></script><script src="~/Scripts/jquery-3.3.1.min.js"></script><script> $(function () {...
2020-08-05 15:37:28 130
原创 EFAPI
private string constr = ConfigurationManager.ConnectionStrings["conn"].ConnectionString; public int Execute(string sql) { using (SqlConnection con = new SqlConnection("Data Source=DESKTOP-5M0V3KJ;Initial Catalog=ExamDB;Integrat...
2020-08-05 15:35:13 133
原创 linq分页
int pagesize = 5; //显示 public IActionResult Index(int pageindex = 1) { List<RBAC_RoleModel> list = business.Select<RBAC_RoleModel>("select * from RBAC_Role"); //linq分页 if (list == n...
2020-08-04 19:51:52 210
原创 控制器
public class DefaultController : ApiController { DapperHelper helper = new DapperHelper(); [HttpGet] [Route("api/getInfos")] public IHttpActionResult getEmail() { List<CountryModel> list = hel...
2020-08-04 15:57:01 88
原创 MVC11111111
@{ ViewBag.Title = "Index";}<h2>Index</h2><link href="~/Content/bootstrap.css" rel="stylesheet" /><script src="~/Scripts/jquery-3.3.1.js"></script><script src="~/Scripts/jquery-3.3.1.min.js"></script>&...
2020-08-04 15:56:06 88
原创 MVC
public string GetAPIData(string requestMethod, string actionName, object obj = null) { HttpClient hc = new HttpClient(); hc.BaseAddress = new Uri("https://localhost:44313/api/student/"); Task<HttpResponseMess...
2020-06-09 14:25:36 123
原创 修改
<link href="~/Content/bootstrap.css" rel="stylesheet" /><script src="~/Content/jquery-3.3.1.js"></script><style> #tab { margin-left: 100px; margin-top: 50px; } #tab td { padding: 10px;...
2020-06-09 14:24:53 148
原创 显示
<link href="~/Content/bootstrap.css" rel="stylesheet" /> <script src="~/Content/jquery-3.3.1.js"></script><h4>后台管理>学生管理>学生列表</h4>学生名称:<input id="tbName" type="text" /><select id="slClass"></select...
2020-06-09 14:24:16 135
原创 添加
@{ ViewBag.Title = "AddStudent"; Layout = "~/Views/Shared/_LayoutPage1.cshtml";}<link href="~/Content/bootstrap.css" rel="stylesheet" /><script src="~/Content/jquery-3.3.1.js"></script><style> #tab{ margin-le...
2020-06-09 14:23:36 202
原创 ApiController
public class StudentController : ApiController { StudentDAL dal = new StudentDAL(); [HttpGet] public List<StudentInfo> ShowStudent(string sname="",int cId=0,int pageIndex=1,int pageSize=3) { return dal...
2020-06-09 14:22:43 1034
原创 三次握手
public class StudentDAL { /// <summary> /// 分页显示 /// </summary> /// <param name="sname"></param> /// <param name="cId"></param> /// <param name="pageIndex"><...
2020-06-09 14:22:05 111
原创 DBHelper
public class DBHelper { static string strconn = "Data Source=.;Initial Catalog=HomeWork2DB;Integrated Security=True"; static public DataTable GetDataTable(string sql) { using (SqlConnection conn=new SqlConnection(s...
2020-06-09 14:20:53 163
原创 SQL存储过程
create database HomeWork2DBuse HomeWork2DBcreate table StudentInfo( SNo int primary key, SName nvarchar(20), SSex bit, Sqq nvarchar(20), SPhone nvarchar(20), CId int)create table ClassInfo( ...
2020-06-09 14:18:56 127
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人