连接数据库

一下using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using jgsbTableAdapters;

/// <summary>
/// jgsb 的摘要说明
/// </summary>
[System.ComponentModel.DataObject]
public class Jg_xmms
{
public Jg_xmms()
{
//
// TODO: 在此处添加构造函数逻辑
//
}

private jg_xmmsTableAdapter _jgxmmsAdp = null;
protected jg_xmmsTableAdapter JgxmmsAdp
{
get
{
if (_jgxmmsAdp == null)
{
_jgxmmsAdp = new jg_xmmsTableAdapter();

}
return _jgxmmsAdp;
}
}

/// <summary>
/// 获得所有jg_xmms表中数据
/// </summary>
/// <returns></returns>
public jgsb.jg_xmmsDataTable GetAllData()
{
return JgxmmsAdp.GetAllData();
}

/// <summary>
/// 当bcnz=0时,获得数据
/// </summary>
/// <returns></returns>
public jgsb.jg_xmmsDataTable GetDataBybcnz_0()
{
return JgxmmsAdp.GetDataBybcnz_0();
}

/// <summary>
/// 当bcnz=1时,获得数据
/// </summary>
/// <returns></returns>
public jgsb.jg_xmmsDataTable GetDataBybcnz_1()
{
return JgxmmsAdp.GetDataBybcnz_1();
}

/// <summary>
/// 当xmlsh=?时,获得数据
/// </summary>
/// <param name="xmlsh">项目流水号</param>
/// <returns></returns>
public jgsb.jg_xmmsDataTable GetDataByxmlsh(string xmlsh)
{
return JgxmmsAdp.GetDataByxmlsh(xmlsh);
}

/// <summary>
/// 修改
/// </summary>
/// <param name="xmlsh">项目流水号</param>
/// <param name="dqbm">地区编码</param>
/// <param name="dqmc">地区名称</param>
/// <param name="sbny">申报时间</param>
/// <param name="xmlb">项目类别</param>
/// <param name="xmmc">项目名称</param>
/// <param name="sblb">设备类别</param>
/// <param name="sbmc">设备名称</param>
/// <param name="sbbm">申报部门</param>
/// <param name="zjly">资金来源</param>
/// <param name="kgtime">预计开工日期</param>
/// <param name="jstime">预计结束日期</param>
/// <param name="sbtime">申报日期--指项目的申报日期</param>
/// <param name="xzfx">现状分析</param>
/// <param name="byx">项目实施的必要性</param>
/// <param name="ssfa">实施方案</param>
/// <param name="bz">备注</param>
/// <param name="dxjg">大修还是技改</param>
/// <param name="bcnz">保存扭转--0只是保存但不提交1保存并提交</param>
/// <param name="Original_xmlsh">原项目流水号</param>
/// <returns></returns>
public int Update(
string xmlsh,
string dqbm,
string dqmc,
string sbny,
string xmlb,
string xmmc,
string sblb,
string sbmc,
string sbbm,
string zjly,
string kgtime,
string jstime,
string sbtime,
string xzfx,
string byx,
string ssfa,
string bz,
string dxjg,
string bcnz,
string dklx,
string by1,
string Original_xmlsh)
{
return JgxmmsAdp.Update(
xmlsh,
dqbm,
dqmc,
System.Convert.ToDateTime(sbny),
xmlb,
xmmc,
sblb,
sbmc,
sbbm,
zjly,
System.Convert.ToDateTime( kgtime),
System.Convert.ToDateTime( jstime),
System.Convert.ToDateTime( sbtime),
xzfx,
byx,
ssfa,
bz,
dxjg,
System.Convert.ToInt32( bcnz),
System.Convert.ToInt32(dklx),
System.Convert.ToInt32(by1),
Original_xmlsh);
}
/// <summary>
/// 添加新记录到jg_xmms表
/// </summary>
/// <param name="xmlsh">项目流水号</param>
/// <param name="dqbm">地区编码</param>
/// <param name="dqmc">地区名称</param>
/// <param name="sbny">申报时间</param>
/// <param name="xmlb">项目类别</param>
/// <param name="xmmc">项目名称</param>
/// <param name="sblb">设备类别</param>
/// <param name="sbmc">设备名称</param>
/// <param name="sbbm">申报部门</param>
/// <param name="zjly">资金来源</param>
/// <param name="kgtime">预计开工日期</param>
/// <param name="jstime">预计结束日期</param>
/// <param name="sbtime">申报日期--指项目的申报日期</param>
/// <param name="xzfx">现状分析</param>
/// <param name="byx">项目实施的必要性</param>
/// <param name="ssfa">实施方案</param>
/// <param name="bz">备注</param>
/// <param name="dxjg">大修还是技改</param>
/// <param name="bcnz">保存扭转--0只是保存但不提交1保存并提交</param>
/// <returns>表</returns>
public int Add(
string xmlsh,
string dqbm,
string dqmc,
string sbny,
string xmlb,
string xmmc,
string sblb,
string sbmc,
string sbbm,
string zjly,
string kgtime,
string jstime,
string sbtime,
string xzfx,
string byx,
string ssfa,
string bz,
string dxjg,
string bcnz,
string dklx,
string by1)
{
return JgxmmsAdp.Insert(
xmlsh,
dqbm,
dqmc,
System.Convert.ToDateTime(sbny),
xmlb,
xmmc,
sblb,
sbmc,
sbbm,
zjly,
System.Convert.ToDateTime(kgtime),
System.Convert.ToDateTime(jstime),
System.Convert.ToDateTime(sbtime),
xzfx,
byx,
ssfa,
bz,
dxjg,
System.Convert.ToInt32(bcnz),
System.Convert.ToInt32(dklx),
System.Convert.ToInt32(by1));
}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值