登录
首页 » C#源码 » C#调用存储过程显示客户的订单金额

C#调用存储过程显示客户的订单金额

于 2022-10-21 发布 文件大小:55.27 kB
0 178
下载积分: 2 下载次数: 1

代码说明:

Visual C# 通过调用存储过程显示客户的订单金额,获取客户的订单总额(获取存储过程参数的返回值):   private void button1_Click(object sender, EventArgs e)   {//获取客户的订单总额(获取存储过程参数的返回值)    DataClasses1DataContext MyDataContext = new DataClasses1DataContext();    string MyCustomer = "alfki";    decimal? MyAmount = 0;    MyDataContext.CustOrderTotal(MyCustomer, ref MyAmount);    MessageBox.Show(MyCustomer+"客户的订单金额是:"+MyAmount.ToString(),"信息提示",MessageBoxButtons.OK);   }

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 支付宝免签收款
    支付宝免签收款源码,不用购买接口,免费试用
    2022-01-24 10:18:05下载
    积分:1
  • C#结合数据库生成饼形图表
    C#结合数据库生成饼形图表,这种图表是常见的数据统计图表,饼形图、柱状图等使用十分广泛,本程序演示了C#从数据库中读取出数据,然后交给饼形图生成模块,加载数据生成饼形图表。   //清空背景色   g.Clear(Color.White);   Pen pen1 = new Pen(Color.Red);   Brush brush1 = new SolidBrush(Color.PowderBlue);   Brush brush2 = new SolidBrush(Color.Blue);   Brush brush3 = new SolidBrush(Color.Wheat);   Brush brush4 = new SolidBrush(Color.Orange);   Font font1 = new Font("Courier New", 16, FontStyle.Bold);   Font font2 = new Font("Courier New", 8);   g.FillRectangle(brush1, 0, 0, width, height); //绘制背景图   g.DrawString("公司员工年龄比例饼形图", font1, brush2, new Point(80, 20)); //书写标题   int piex = 100, piey = 60, piew = 200, pieh = 200;   //20-25岁员工在圆中分配的角度   float angle1 = Convert.ToSingle((360 / Convert.ToSingle(Sum)) * Convert.ToSingle(man20to25));   //26-30岁员工在圆中分配的角度   float angle2 = Convert.ToSingle((360 / Convert.ToSingle(Sum)) * Convert.ToSingle(man26to30));   //31-40岁员工在圆中分配的角度   float angle3 = Convert.ToSingle((360 / Convert.ToSingle(Sum)) * Convert.ToSingle(man31to40));   g.FillPie(brush2
    2022-04-12 00:35:45下载
    积分:1
  • C#使用微信模拟发送post消息请求
    C#模拟发送post请求,使用微信模拟消息,Post请求模拟器。   WebClient wc = new WebClient();   wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");   byte[] postdata = Encoding.UTF8.GetBytes(poststr);   byte[] responseData = wc.UploadData(textBox3.Text, "POST", postdata);//得到返回字符流   textBox2.Text = Encoding.UTF8.GetString(responseData);
    2022-11-24 04:30:03下载
    积分:1
  • C# 修复Access数据库的一个范例程序
    C# 修复Access数据库的一个范例程序,不过不知道到底能不能修复吧,这个修复过程的编写,可参考以下代码:   //声明临时数据库的名称   string temp = DateTime.Now.Year.ToString();   temp += DateTime.Now.Month.ToString();   temp += DateTime.Now.Day.ToString();   temp += DateTime.Now.Hour.ToString();   temp += DateTime.Now.Minute.ToString();   temp += DateTime.Now.Second.ToString() + ".bak";   temp = strPathMdb.Substring(0, strPathMdb.LastIndexOf("") + 1) + temp;   //定义临时数据库的连接字符串   string temp2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + temp;   //定义目标数据库的连接字符串   string strPathMdb2 = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + strPathMdb;   JRO.JetEngineClass jt = new JRO.JetEngineClass();//创建一个JetEngineClass对象   //使用JetEngineClass对象的CompactDatabase方法压缩修复数据库   jt.CompactDatabase(strPathMdb2, temp2);      File.Copy(temp, strPathMdb, true);//拷贝临时数据库到目标数据库(覆盖)   File.Delete(temp);//删除临时数据库   MessageBox.Show("修复完成");   这个程序中使用了三个类库:Interop.ADODB.dll、Interop.ADOX.dll、Interop.JRO.dll。
    2022-01-26 03:31:51下载
    积分:1
  • C# 房屋中介系统文档+
    C# 房屋中介系统文档+源代码,这是一本书中的范例,来自明日科技,这个房屋中介系统可以很容易扩展成一个功能强大的中介系统,而不局限于房屋的中介。系统功能:用户信息管理、求租管理、员工信息、出租管理、交费管理、业务统计、常用工具、系统管理等。这套房屋中介系统的界面也是挺不错的,有点专业范,左侧有树状菜单等。
    2023-06-28 09:40:03下载
    积分:1
  • 7Zip
    This file is part of SevenZipSharp.    SevenZipSharp is free software: you can redistribute it and/or modify    it under the terms of the GNU Lesser General Public License as published by    the Free Software Foundation, either version 3 of the License, or    (at your option) any later version.    SevenZipSharp is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    GNU Lesser General Public License for more details.    You should have received a copy of the GNU Lesser General Public License    along with SevenZipSharp.  If not, see .
    2022-07-20 00:09:31下载
    积分:1
  • Visual C#对 XML操作的演示示例集
    这是一个C#操作XML文件的示例集,可完成 如下功能演示:   枚举XML集合中的元素名称   枚举XML集合中的元素文本   判断XML元素在集合中是否存在   筛选XML中的子代元素集合   使用链接轴方法枚举XML元素   根据元素属性查找XML元素   根据元素名称查找XML元素   根据元素属性和名称查找XML元素   根据中间计算值查找XML元素   比如枚举XML集合中的元素文本:private void button2_Click(object sender, EventArgs e)   {//枚举XML集合中的元素文本    XElement MyXElements = new XElement("Root",    new XElement("贵州省", "贵阳市"),    new XElement("四川省", "成都市"));    IEnumerable MyXElement =    from MySelect in MyXElements.Elements()    select MySelect;    string MyInfo = "元素文本包括:";    foreach (XElement MyValue in MyXElement)    MyInfo += MyValue.Value + "、";    //显示:贵阳市、成都市    MessageBox.Show(MyInfo, "信息提示", MessageBoxButtons.OK);   }
    2022-03-14 22:11:51下载
    积分:1
  • C# 中的MaskedTextBox控件用法示例
    C# 中的MaskedTextBox控件用法示例,类似于掩码功能的文本框,比如密码框,不会显示出用户输入的字符。本示例将向大家介绍如何将数据绑定到MaskedTextBox控件。   不过本例需要连接数据库,连接好后,用户可通过窗口上的上一电话号码、下一电话号码来查看演示。
    2022-03-24 22:11:34下载
    积分:1
  • LIVE555协议
    环境为VS2010+Win7,文件里包含编译好的live555、提取的4个lib、myLive555Header和编译截图,具体过程可以参考博文:http://www.cnblogs.com/skyseraph/
    2022-05-22 12:22:07下载
    积分:1
  • C# 日志事件操作相关函数集
    C# 日志事件操作相关函数集,完成的功能有:从Windows窗体播放资源中嵌入的声音、判断程序文件是否为.NET程序集、查询日志文件中指定类型事件、将日志事件信息导出到外部文件中、获取日志事件的静态和配置信息等功能。
    2022-02-15 05:43:25下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载