当前位置:首页 > 代码 > 正文

.net小程序设计源代码(小程序开发代码大全)[20240429更新]

admin 发布:2024-04-29 16:45 135


本篇文章给大家谈谈.net小程序设计源代码,以及小程序开发代码大全对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。

本文目录一览:

求教 一个基于.NET的C#小程序

这是主页面的代码.

另外我还附加了个类算是做为公用类,引用.比较简单

我可是自己写了二小时,我也是刚学的

写的有点乱.不过还算能执行你的要求.

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using System.Data.SqlClient;

namespace cccc

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

public void Form1_Load(object sender, EventArgs e)

{

SqlConnection conn = DB.get();

conn.Open();

a();

}

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)

{

textBox1.Text= dataGridView1.CurrentRow.Cells[0].Value.ToString();

textBox2.Text = dataGridView1.CurrentRow.Cells[1].Value.ToString();

textBox3.Text = dataGridView1.CurrentRow.Cells[2].Value.ToString();

textBox4.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();

}

public void button1_Click(object sender, EventArgs e)

{

add();

}

public void a()

{

SqlConnection conn = DB.get();

conn.Open();

SqlDataAdapter sat = new SqlDataAdapter("select * from tb_user", conn);

DataSet a = new DataSet();

sat.Fill(a);

dataGridView1.DataSource = a.Tables[0];

textBox1.Text = "";

textBox2.Text = "";

textBox3.Text = "";

textBox4.Text = "";

}

private void button2_Click(object sender, EventArgs e)

{

SqlConnection conn = DB.get();

conn.Open();

SqlCommand cmd1 = new SqlCommand();

cmd1.CommandText = "delete from tb_user where id='" +textBox1.Text+"'";

cmd1.Connection = conn;

cmd1.ExecuteNonQuery();

add();

a();

}

public void add()

{

SqlConnection conn = DB.get();

conn.Open();

SqlCommand cmd1 = new SqlCommand();

cmd1.CommandText = "insert into tb_user values(" + textBox1.Text.Trim() + "," + textBox2.Text.Trim() + "," + textBox3.Text.Trim() + "," + textBox4.Text.Trim() + ")";

cmd1.Connection = conn;

cmd1.ExecuteNonQuery();

a();

}

}

}

下面是一个公用类,DB.CS

using System;

using System.Collections.Generic;

using System.Text;

using System.Data.SqlClient;

namespace cccc

{

public  class DB

{

public static SqlConnection get()

{

SqlConnection conn =new SqlConnection("server=.;database=mydata;uid=bo;pwd=123456");

return conn;

}

}

}

我做的就这些,你在页面上加上那几个控件就行了啊.要源码QQ我吧

ASP.NET中设计一个网页小程序。

课本上的题吧。自己努力做吧。这题也要百度的话,会把自己作废的

VB.net做一个小程序 求教

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

Dim oleDbConnection1 As OleDb.OleDbConnection

Dim oledbDataAdapter As OleDb.OleDbDataAdapter

Dim oledbData As DataSet = New DataSet

Dim strConnect As String = "Provider= OraOLEDB.Oracle;Data Source=888;User ID=888;Password=888;"

oleDbConnection1 = New System.Data.OleDb.OleDbConnection(strConnect)

Dim strSql As String

strSql = "select *" " from xx"

Dim oledbCommand As OleDb.OleDbCommand

oledbCommand.CommandText = strSql

oledbCommand.CommandType = CommandType.Text

oledbCommand.Connection = oleDbConnection1

oledbDataAdapter.SelectCommand = oledbCommand

oleDbConnection1.Open()

oledbDataAdapter.Fill(oledbData, "gy_bingrenxx")

oleDbConnection1.Close()

'在窗体上添加一个DataGridView控件,在这个位置加一句代码

DataGridView1.DataSource = oledbDataAdapter.Tables("gy_bingrenxx")

End Sub

「源码分享」ASP.NET仓库进销存ERP管理系统+小程序源码

开发环境为Visual Studio 2012,数据库为SQL SERVER2012R2,使用.net 4.5开发。

一、源码介绍

所有行业的ERP系统/进销存/仓库系统,该系统为vs2012 .net+MsSQL版,目前标准版功能简单、明了、满足公司正常使用,已有多家企业正常使用,成熟稳定,有需要的可以下载看看。

二、主要功能

1、电商管理(可以和公众号、小程序对接) 微信订单、小程序订单、公众号订单

参数设置:轮播图片设置、分类导航设置、小程序参数设置、公众号参数设置

2、销售管理:销售订单、销售出库

3、采购管理:采购订单、采购入库

4、生产管理:BOM分组、BOM清单、生产计划、生产领料、生产入库

5、仓库管理:其他入库、其他出库、商品组装、商品拆卸、库存盘点、库存调拨

6、财务管理:销售收款、其他收款、采购付款、其他付款、收款核销、付款核销

7、采购报表

采购订单跟踪表 采购明细表 采购汇总表(按商品) 采购汇总表(按供应商)

8、销售报表

销售订单跟踪表 销售明细表 销售汇总表(按商品) 销售汇总表(按客户)

9、生产报表

生产计划跟踪表 生产领料明细表 生产领料汇总表 生产入库明细表 生产入库汇总表

10、仓存报表

商品库存余额表 商品收发明细表 商品收发汇总表

11、资金报表

现金银行报表 应付账款明细表 应收账款明细表

客户对账单 供应商对账单 其他收支明细

12、基础资料

供应商管理 商品管理 仓库管理 账户管理 员工管理 企业号通讯录

工序管理 辅助资料 客户类别 供应商类别 商品类别 商品品牌

收支类别 计量单位 结算方式 工序类别 高级设置 操作日志

参数设置 打印设置 Logo印章

3、默认数据库连接字符串在web.config配置文件中修改

获取源码方式:点赞+转发+关注+私信【进销存ERP】

******************************************************************************

欢迎点赞+转发+关注!大家的支持是我分享最大的动力!!!

******************************************************************************

微信小程序实现图片上.net

前端代码:

/*上传图片到服务器  wx.uploadFile

url:后台上传文件路径地址

data:自定义参数 {'userID':'0001'}

fileName:接收数据的参数名称,后台参数类型:System.Web.HttpPostedFileWrapper

CallBack:返回路径

暂时fileName方法传的是:file*/function UploadImage(url,data,fileName,CallBack)

{

 wx.chooseImage({

   success: function (res) {      var tempFilePaths = res.tempFilePaths

     wx.showLoading({ title: '正在上传', mask: true})

     wx.uploadFile({

       url: url,

       filePath: tempFilePaths[0],//临时路径        name: fileName,

       formData: data,

       success: function (res) {          var data = res.data

         wx.hideLoading()

         CallBack(data)

       }

     })

   }

 })

}

后台实现

/// summary

/// 上传图片        /// /summary

/// param name="file"/param

/// param name="userID"/param

/// returns/returns

public string UploadImage(HttpPostedFileWrapper file, string userID)

{            var msg= bll.UploadImage(file.InputStream, userID);            var result = new ReturnResultstring(msg);            return result.Serialize();

}

file参数里面就是数据流的信息,可自行获取之后进行保存。

求一个c#.Net的winForm的小程序!急急急急

timer的enable初始状态为false

private void button1_Click(object sender, EventArgs e)

{

timer1.Enabled = true;

i = textBox1.Text.Trim().Length;

}

string str = "";

int i=0;

private void timer1_Tick(object sender, EventArgs e)

{

if (str.Length i)

{

str = textBox1.Text.Trim().Substring(textBox1.Text.Trim().Length - 1) + str;

}

textBox1.Text = textBox1.Text.Trim().Substring(0, textBox1.Text.Trim().Length - 1);

if (textBox1.Text.Length = 0)

{

textBox1.Text = str;

}

}

private void button2_Click(object sender, EventArgs e)

{

timer1.Enabled = false;

str = "";

}

.net小程序设计源代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于小程序开发代码大全、.net小程序设计源代码的信息别忘了在本站进行查找喔。

版权说明:如非注明,本站文章均为 AH站长 原创,转载请注明出处和附带本文链接;

本文地址:http://www.ahzz.com.cn/post/831.html


取消回复欢迎 发表评论:

分享到

温馨提示

下载成功了么?或者链接失效了?

联系我们反馈

立即下载