public void LoadData() { var supplier = SupplierController.GetAllWithIsHidden(false); StringBuilder html = new StringBuilder(); html.Append("<select id=\"supplierList\" class=\"form-control\" style=\"width: 20%; float: left; margin-right: 10px\">"); html.Append("<option value=\"0\">Tất cả nhà cung cấp</option>"); if (supplier.Count > 0) { foreach (var s in supplier) { html.Append("<option value=\"" + s.ID + "\">" + s.SupplierName + "</option>"); } } html.Append("</select>"); ltrSupplier.Text = html.ToString(); // Lấy css print barcode từ cài đặt var p = ConfigController.GetByTop1(); if (p != null) { hdfCSSPrintBarcode.Value = p.CSSPrintBarcode; } }
public void LoadSupplier() { var supplier = SupplierController.GetAllWithIsHidden(false); ddlSupplier.Items.Clear(); ddlSupplier.Items.Insert(0, new ListItem("Chọn nhà cung cấp", "0")); if (supplier.Count > 0) { foreach (var p in supplier) { ListItem listitem = new ListItem(p.SupplierName, p.ID.ToString()); ddlSupplier.Items.Add(listitem); } ddlSupplier.DataBind(); } }
public void LoadData() { var supplier = SupplierController.GetAllWithIsHidden(false); StringBuilder html = new StringBuilder(); html.Append("<select id='supplierList' class='form-control' style='width: 20%; float: left; margin-right: 10px'>"); html.Append("<option value='0'>Tất cả nhà cung cấp</option>"); if (supplier.Count > 0) { foreach (var s in supplier) { html.Append("<option value='" + s.ID + "'>" + s.SupplierName + "</option>"); } } html.Append("</select>"); ltrSupplier.Text = html.ToString(); }
public void LoadData() { string username = Request.Cookies["userLoginSystem"].Value; int agentID = 0; var acc = AccountController.GetByUsername(username); if (acc != null) { agentID = Convert.ToInt32(acc.AgentID); } var supplier = SupplierController.GetAllWithIsHidden(false); StringBuilder html = new StringBuilder(); //html.Append("<select id=\"supplierList\" class=\"select2 form-control\" style=\"width: 20%; float: left; margin-right: 10px\">"); html.Append("<select id=\"supplierList\" class=\"form-control\" style=\"width: 20%; float: left; margin-right: 10px\">"); html.Append("<option value=\"0\">Tất cả nhà cung cấp</option>"); if (supplier.Count > 0) { foreach (var s in supplier) { html.Append("<option value=\"" + s.ID + "\">" + s.SupplierName + "</option>"); } } html.Append("</select>"); ltrSupplier.Text = html.ToString(); var agentAll = AgentController.GetAllWithIsHidden(false); StringBuilder htmlAgent = new StringBuilder(); //htmlAgent.Append("<select id=\"supplierList\" class=\"select2 form-control\" style=\"width: 20%; float: left; margin-right: 10px\">"); htmlAgent.Append("<select id=\"agentList\" class=\"form-control\" style=\"width: 20%; display:inline-block\">"); htmlAgent.Append("<option value=\"0\">--Chọn đại lý--</option>"); if (agentAll.Count > 0) { foreach (var a in agentAll) { if (a.ID != agentID) { htmlAgent.Append("<option value=\"" + a.ID + "\">" + a.AgentName + "</option>"); } } } htmlAgent.Append("</select>"); ltrAgent.Text = htmlAgent.ToString(); }