protected void BtnQueryddUnfinish_Click(object sender, EventArgs e) { HideOthers(); GVYPDetail.Visible = false; GVDD.Visible = true; string userid = Request.QueryString["userid"].Trim(); String sql = String.Format("select *,ROW_NUMBER() OVER(ORDER BY YFID asc) as SerialN from (select * from" + " (select YFID Y, USERID u from ZYF_QT_YFPZ where USERID = '{0}')" + "as a inner join (select YFID, YFKCID T from ZYF_JG_YFKC)as b " + "on a.Y = b.YFID inner join(select * from ZYF_QT_DD where DDFinish = 0)" + "as c on b.T = c.YFKCID inner join(select YPID m, YPName from ZYF_JG_YP) as e " + "on c.YPID = e.m)as d where d.USERID = '{1}'", Request.QueryString["userid"].ToString(), DDLDD.Text); SqlHelper shr = new SqlHelper(); if (DDLDD.Text.ToString() == "") { BindDDLDD(); } else { DataTable dt = shr.Query(sql); GVDD.DataSource = dt; GVDD.DataBind(); } //合理性检测 LBLYPRightCheck.Visible = true; LBLYPRightCheck.Text = "此用户订单无异常状况"; shr.CloseConn(); }
private void BANDDD() { DataTable dt = zdService.SELECT_CRM_ZDADD_ED(); GVDD.DataSource = dt; GVDD.DataBind(); }
protected void GVDD_PageIndexChanging(object sender, GridViewPageEventArgs e) { GVCalendar.PageIndex = e.NewPageIndex; string sql = string.Format("select DDID,USERID,YPName,c.YPID,DDNum,DDPrice,SerialN,DDFinish from(" + "select YFID from ZYF_QT_YFPZ where USERID = '{0}') as a " + "inner join(select* from ZYF_JG_YFKC )as b " + "on a.YFID = b.YFID inner join(select*, ROW_NUMBER() OVER(ORDER BY YFKCID asc) as SerialN from ZYF_QT_DD)as c " + "on b.YFKCID = c.YFKCID inner join(select YPID, YPName from ZYF_JG_YP)as d " + "on c.YPID = d.YPID", Request.QueryString["userid"].Trim()); SqlHelper shr = new SqlHelper(); DataTable dt = shr.Query(sql); GVDD.DataSource = dt; GVDD.DataBind(); shr.CloseConn(); }
protected void BtnQueryddAll_Click(object sender, EventArgs e) { GVDD.Visible = true; GVYPDetail.Visible = false; //--pz - yfkcid - dduser string sql = string.Format("select DDID,USERID,YPName,c.YPID,DDNum,DDPrice,SerialN,DDFinish from(" + "select YFID from ZYF_QT_YFPZ where USERID = '{0}') as a " + "inner join(select* from ZYF_JG_YFKC )as b " + "on a.YFID = b.YFID inner join(select*, ROW_NUMBER() OVER(ORDER BY YFKCID asc) as SerialN from ZYF_QT_DD)as c " + "on b.YFKCID = c.YFKCID inner join(select YPID, YPName from ZYF_JG_YP)as d " + "on c.YPID = d.YPID", Request.QueryString["userid"].Trim()); SqlHelper shr = new SqlHelper(); DataTable dt = shr.Query(sql); GVDD.DataSource = dt; GVDD.DataBind(); shr.CloseConn(); HideOthers(); GVDD.Visible = true; }
public void BindGVDD() { string bindgvdd = string.Format("select *,ROW_NUMBER() OVER(ORDER BY DDID asc) as SerialN from " + "(select * from ZYF_QT_DD where USERID = '{0}' AND DDFinish = 0) as aaa " + "inner join(select YPID, YPName from ZYF_JG_YP) as bbb on aaa.YPID = bbb.YPID", Request.QueryString["userid"].Trim()); SqlHelper shr = new SqlHelper(); DataTable dt = shr.Query(bindgvdd); if (dt.Rows.Count <= 0) { Label3.Visible = true; Label3.Text = "您暂时没有订单,请重新预约"; } else { Label3.Visible = true; Label3.Text = "预约成功!"; } shr.CloseConn(); GVDD.DataSource = dt; GVDD.DataBind(); }
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e) { if (TreeView1.SelectedValue == "查询总订单") { GVDD.Visible = true; GVYPDetail.Visible = false; string sql = string.Format("select * from (select *, " + "ROW_NUMBER() OVER(ORDER BY DDID asc) as SerialN from ZYF_QT_DD WHERE USERID like" + " '{0}') as aa inner join(select YPName, YPID from ZYF_JG_YP)as bb on aa.YPID =" + " bb.YPID", Request.QueryString["userid"].Trim()); SqlHelper shr = new SqlHelper(); DataTable dt = shr.Query(sql); shr.CloseConn(); GVDD.DataSource = dt; GVDD.DataBind(); } else if (TreeView1.SelectedValue == "添加药品") { HideOthers(); UpdatePanel1.Visible = true; } else if (TreeView1.SelectedValue == "新建日程") { HideOthers(); PanelAddCal.Visible = true; } else if (TreeView1.SelectedValue == "修改日程") { HideOthers(); PanelFork.Visible = true; } else if (TreeView1.SelectedValue == "退出") { Response.Redirect("~/ZYFLogin.aspx"); } }