protected void Page_Load(object sender, EventArgs e) { serviceId = String.IsNullOrEmpty(Request.QueryString["serviceId"]) ? string.Empty : Request.QueryString["serviceId"]; var catId = String.IsNullOrEmpty(Request.QueryString["catId"]) ? string.Empty : Request.QueryString["catId"]; if (!IsPostBack) { CustomerRepeater.DataSource = customerGroupBo.get_CustomerServicesGroup(catId); CustomerRepeater.DataBind(); } }
private void TablerowContent() { string sql = "SELECT *,null ccpID,null ZDFee,null Remarks FROM [PDT_Products] where IsEnable=1"; if (Request["TrackID"] != null && Request["TrackID"] != "") { WX.CRM.CustomerProgram.MODEL program = WX.CRM.CustomerProgram.GetModel("SELECT * FROM CRM_CustomerProgram where TrackID=" + Request["TrackID"]); sql = "SELECT pp.*,ccp.id ccpID,ccp.ZDFee,ccp.Remarks FROM [PDT_Products] pp left join CRM_CustomerProducts ccp on pp.id=ccp.ProductID and PID=" + program.id.ToString() + " and ccp.Type=1 where pp.IsEnable=1"; } System.Data.DataTable dt = ULCode.QDA.XSql.GetDataTable(sql); CustomerRepeater.DataSource = dt; CustomerRepeater.DataBind(); }
private void TablerowContent() { WX.CRM.CustomerProgram.MODEL program = WX.CRM.CustomerProgram.GetModel("SELECT * FROM CRM_CustomerProgram where TrackID=" + Request["TrackID"]); if (program != null) { liProgramContent.Text = program.Content.ToString(); liProgramTitle.Text = program.Title.ToString(); liProgramLK.Text = program.Remarks.ToString(); liProgramTime.Text = program.ProgramTime.ToDateTime().ToString("yyyy-MM-dd"); liProgramPath.Text = "<a href='" + program.Program.ToString() + "'>" + program.Program.ToString() + "</a>"; System.Data.DataTable dt = ULCode.QDA.XSql.GetDataTable("SELECT pp.ProductName,pp.Remark PRemark,pp.SalesPrice,ccp.ZDFee,ccp.Remarks FROM CRM_CustomerProducts ccp left join PDT_Products pp on ccp.ProductID=pp.ID where Type=1 and PID=" + program.id.ToString()); CustomerRepeater.DataSource = dt; CustomerRepeater.DataBind(); } }
protected void BindCustomers() { try { if (Global.Library.Settings.Customers != null) { var list = (from n in Global.Library.Settings.Customers orderby n.CompanyName select n).ToList(); CustomerBindinglist custlist = new CustomerBindinglist(list); CustomerRepeater.DataSource = custlist; CustomerRepeater.DataBind(); } } catch { PopNotify("Error", "Could Not Bind Customers"); } }
protected void ButtonCustomers_Click(object sender, EventArgs e) { SqlConnection conn; SqlCommand comm; SqlDataReader reader; string connectionString = ConfigurationManager.ConnectionStrings["DVDdbCS"].ConnectionString; conn = new SqlConnection(connectionString); comm = new SqlCommand("SELECT CustomerID, FirstName, LastName FROM Customers", conn); try { conn.Open(); reader = comm.ExecuteReader(); CustomerRepeater.DataSource = reader; CustomerRepeater.DataBind(); reader.Close(); } finally { conn.Close(); } }