protected void Page_Load(object sender, EventArgs e) { userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; if (!Page.IsPostBack) { this.txt_begintime.Text = DateTime.Now.ToString("yyyy-MM-01"); this.txt_endtime.Text = DateTime.Now.ToString("yyyy-MM-dd"); string flag = this.summaryType.Value; switch (flag) { case "1": lbl_title.Text = "部门/分店名称"; break; case "2": lbl_title.Text = "业务员姓名"; break; case "3": lbl_title.Text = "产品名称"; break; } rpt_result1.DataSource = UserProjectInfoBus.GetSummaryData(this.txt_begintime.Text, this.txt_endtime.Text, userInfo, typeorder.Value, int.Parse(this.summaryType.Value), userInfo.SelPoint); rpt_result1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.QueryString["id"] != null) { UserInfoUtil userInfo = (UserInfoUtil)SessionUtil.Session["UserInfo"]; DataTable dt = UserProjectInfoBus.GetDataDetailByID(Request.QueryString["id"].ToString(), userInfo); productNo.Text = dt.Rows[0]["productNum"].ToString(); productname.Text = dt.Rows[0]["productName"].ToString(); price.Text = dt.Rows[0]["price"].ToString(); brief.Text = dt.Rows[0]["bref"].ToString(); memo.Text = dt.Rows[0]["memo"].ToString(); HidID.Value = dt.Rows[0]["ID"].ToString(); } } }
protected void btn_query_Click(object sender, ImageClickEventArgs e) { this.txt_begintime.Text = HidBeginTime.Value; this.txt_endtime.Text = HidEndTime.Value; string flag = this.summaryType.Value; switch (flag) { case "1": lbl_title.Text = "部门/分店名称"; break; case "2": lbl_title.Text = "业务员姓名"; break; case "3": lbl_title.Text = "产品名称"; break; } rpt_result1.DataSource = UserProjectInfoBus.GetSummaryData(this.txt_begintime.Text, this.txt_endtime.Text, userInfo, typeorder.Value, int.Parse(this.summaryType.Value), userInfo.SelPoint); rpt_result1.DataBind(); }