.NET进销存管理系统 第9页
lblgxmassage.Text = QxManager.modifyQx(qx);
qxDataBind();
cleanGX();
}
}
//添加新项
protected void btntj_Click(object sender, EventArgs e)
{
Qx qx = new Qx();
if (txtbqxmctj.Text == null || txtbqxmctj.Text == "")
{
lbltjmassage.Text = "请填写用户名!";
}
else
{
qx.Qxmc = txtbqxmctj.Text;
qx.Qxurl = txtbqxurltj.Text;
qx.Qxbz = txtbbztj.Text;
lbltjmassage.Text = QxManager.addQx(qx);
qxDataBind();
cleanTJ();
}
权限设置流程图5-6
图5-7 权限设置(JCXX_QX.aspx)
5.2.4进货单查询
在这个页面可以根据不同的条件查询查找存在的数据,并且可以根据表头进行排序,进货单查询流程图5-8,进货单查询图5-9所示。
进货单查询代码:
public static IList<Jhd> getJhdsByCondition(string condition1,string condition2)
{ IList<Jhd> jhds = new List<Jhd>();
try
{
string sql = "select jhrq,ywy,jhdbh,jhddbh,gysbh,ckbh,spbh,sl,dj,
zk,zje,sfjsfk,sfjz,yfje,jhdbz from jhd where 1=1";
if (condition1 != "-1" && condition2 != null)
sql += " and " + condition1 + " like '%" + condition2 + "%'";
using (SqlDataReader reader = DBHelper.GetReader(sql))
{
while (reader.Read())
{
Jhd jhd = new Jhd();
jhds.Add(jhd);
}
}
}catch (Exception ex)
{
throw new Exception(ex.ToString());
}
return jhds;
}
}
进货查询流程图5-8
图5-9 进货单查询(JH_JHCX.aspx)
5.2.5 销售订单校验
在这个页面可以对销售订单进行校验,随意更改一项、多项或全部状态(销售订单的四种状态的三种,分别是未确认、确认、退货、),销售单校验流程图5-10,销售单校验图5-11所示。
销售订单校验的部分代码:
//绑定销售订单
public void xsddDataBind() {
gvXsddjy.DataSource = XsddManager.getAllXsdd("","3");
gvXsddjy.DataBind();
}
//修改事件
protected void btnxg_Click(object sender, EventArgs e)
{
if(ddlzt.SelectedValue == "-1"){
lblmassage.Text = "请选择修改后的状态!";
}
else{
string xsddbhs = string.Empty;
for (int i = 0; i < gvXsddjy.Rows.Count;i++ )//遍历所有行
{
CheckBox ckb = (gvXsddjy.Rows[i].FindControl("ckbzt")) as CheckBox;
//获得id为ckbzt的控件并转化为CheckBox
if(ckb.Checked == true){//如果选中
xsddbhs += (gvXsddjy.Rows[i].FindControl("lblxsddbh") as Label).Text + ",";//把选中项的编号累加到字符串中
}
}
if (xsddbhs.Length > 0)
{
xsddbhs = xsddbhs.Substring(0, xsddbhs.Length - 1);//去掉末尾的逗号
string zt = ddlzt.SelectedValue;//
XsddManager.modifyZtByDdbh(zt, xsddbhs);//
xsddDataBind();//
lblmassage.Text = "成功修改选中项的状态!";
}
else {
lblmassage.Text = "请选择要修改的项!";
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] ... 下一页 >>
.NET进销存管理系统 第9页下载如图片无法显示或论文不完整,请联系qq752018766