public void BindData() { SupplierInfo supplierById = SupplierHelper.GetSupplierById(this.supplierId); ManagerInfo managerInfo = ManagerHelper.FindManagerByStoreIdAndRoleId(this.supplierId, -2); if (supplierById == null || managerInfo == null) { base.Response.Redirect("SupplierList.aspx"); } else { this.lblManageId.Text = managerInfo.ManagerId.ToString(); Literal literal = this.lblUserName; Literal literal2 = this.lblUserName2; string text2 = literal.Text = (literal2.Text = managerInfo.UserName); TrimTextBox trimTextBox = this.txtSupplierName; Literal literal3 = this.lblSupplierName; text2 = (trimTextBox.Text = (literal3.Text = supplierById.SupplierName)); string text4 = "正常 <a href=\"javascript:void(0);\" onclick=\"updatesupperstate(2)\">冻结</a>"; if (supplierById.Status != 1) { text4 = "冻结 <a href=\"javascript:void(0);\" onclick=\"updatesupperstate(1)\">恢复</a>"; } this.lblStatus.Text = text4; this.hidOldImages.Value = supplierById.Picture; this.txtContactMan.Text = supplierById.ContactMan; this.txtTel.Text = supplierById.Tel; this.dropRegion.SetSelectedRegionId(supplierById.RegionId); this.txtAddress.Text = supplierById.Address; this.editDescription.Text = supplierById.Introduce; } }
public void BindData() { ManagerInfo manager = HiContext.Current.Manager; SupplierInfo supplierById = SupplierHelper.GetSupplierById(manager.StoreId); this.lblUserName.Text = manager.UserName; if (string.IsNullOrEmpty(supplierById.TradePassword)) { this.liTradePass_Empty.Visible = true; this.liTradePass_Old.Visible = false; this.ltistradepass.Text = "0"; this.lipass0.Attributes.Add("class", ""); this.divright0.Attributes.Add("style", "display:none"); this.lipass1.Attributes.Add("class", "hover"); this.divright1.Attributes.Add("style", ""); } else { this.liTradePass_Empty.Visible = false; this.liTradePass_Old.Visible = true; this.ltistradepass.Text = "1"; this.lipass0.Attributes.Add("class", "hover"); this.divright0.Attributes.Add("style", ""); this.lipass1.Attributes.Add("class", ""); this.divright1.Attributes.Add("style", "display:none"); } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["supplierId"], out supplierId)) { base.GotoResourceNotFound(); return; } SupplierInfo shipper = SupplierHelper.GetSupplier(this.supplierId); if (shipper == null) { base.GotoResourceNotFound(); return; } this.rptProducts = (ThemedTemplatedRepeater)this.FindControl("rptProducts"); this.hotSale = (Common_GoodsList_HotSale)this.FindControl("list_Common_GoodsList_HotSale");//销售排行 this.pager = (Pager)this.FindControl("pager"); this.litSearchResultPage = (System.Web.UI.WebControls.Literal) this.FindControl("litSearchResultPage"); if (!this.Page.IsPostBack) { this.BindSearch(); } }
protected override void AttachChildControls() { this.serach_text = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("search_text"); this.search_Subtext = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("search_Subtext"); this.rptProducts = (ThemedTemplatedRepeater)this.FindControl("rptProducts"); this.pager = (Pager)this.FindControl("pager"); this.litProductCount = (System.Web.UI.WebControls.Literal) this.FindControl("litProductCount"); this.litSupplierDescribe = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierDescribe"); if (!int.TryParse(this.Page.Request.QueryString["supplierId"], out supplierId)) { base.GotoResourceNotFound(); return; } SupplierInfo shipper = SupplierHelper.GetSupplier(this.supplierId); if (shipper == null) { base.GotoResourceNotFound(); return; } else { litSupplierDescribe.Text = shipper.Description; } if (!this.Page.IsPostBack) { this.BindSearch(); } }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["supplierId"], out supplierId)) { return; } SupplierInfo shipper = SupplierHelper.GetSupplier(this.supplierId); if (shipper == null) { return; } this.litStoreName = (System.Web.UI.WebControls.Literal) this.FindControl("litStoreName"); this.litStoreOwnerName = (System.Web.UI.WebControls.Literal) this.FindControl("litStoreOwnerName"); this.litStoreAddress = (System.Web.UI.WebControls.Literal) this.FindControl("litStoreAddress"); this.SupplierADImg = (System.Web.UI.WebControls.Image) this.FindControl("SupplierADImg"); this.litStoreName.Text = string.IsNullOrWhiteSpace(shipper.ShopName) ? shipper.SupplierName : shipper.ShopName; //shipper.SupplierName; this.litStoreOwnerName.Text = shipper.ShopOwner; this.litStoreAddress.Text = RegionHelper.GetFullRegion(shipper.County, ""); if (!string.IsNullOrWhiteSpace(shipper.PCImage)) { this.SupplierADImg.ImageUrl = shipper.PCImage; } }
private void BindSupplier() { this.ddlSupplier.DataSource = SupplierHelper.GetSupplier(); this.ddlSupplier.DataTextField = "SupplierName"; this.ddlSupplier.DataValueField = "SupplierId"; this.ddlSupplier.DataBind(); }
private void BindStatistics() { SupplierStatisticsInfo statisticsInfo = SupplierHelper.GetStatisticsInfo(HiContext.Current.Manager.StoreId); this.lblTodayOrderAmout.Text = ((statisticsInfo.OrderPriceToday > decimal.Zero) ? ("¥" + Globals.FormatMoney(statisticsInfo.OrderPriceToday)) : string.Empty); ClassShowOnDataLitl classShowOnDataLitl = this.lblTodayFinishOrder; object text; int num; if (statisticsInfo.OrderNumbToday <= 0) { text = string.Empty; } else { num = statisticsInfo.OrderNumbToday; text = num.ToString(); } classShowOnDataLitl.Text = (string)text; ClassShowOnDataLitl classShowOnDataLitl2 = this.ltrTodayAddMemberNumber; object text2; if (statisticsInfo.ProductNumbOnSale <= 0) { text2 = string.Empty; } else { num = statisticsInfo.ProductNumbOnSale; text2 = num.ToString(); } classShowOnDataLitl2.Text = (string)text2; if (statisticsInfo.OrderNumbWaitConsignment > 0) { string arg = "javascript:ShowSecondMenuLeft('订单','sales/manageorder.aspx','sales/ManageOrder.aspx?orderStatus=2')"; this.ltrWaitSendOrdersNumber.Text = $"<a href=\"{arg}\"><em>{statisticsInfo.OrderNumbWaitConsignment}</em>条</a>"; } if (statisticsInfo.OrderReplaceNum > 0) { string arg2 = "javascript:ShowSecondMenuLeft('订单','sales/replaceapply.aspx','sales/replaceapply.aspx')"; this.lblOrderReplaceNum.Text = $"<a href=\"{arg2}\"><em>{statisticsInfo.OrderReplaceNum}</em>条</a>"; } if (statisticsInfo.OrderReturnNum > 0) { string arg3 = "javascript:ShowSecondMenuLeft('订单','sales/returnsapply.aspx','sales/returnsapply.aspx')"; this.lblOrderReturnNum.Text = $"<a href=\"{arg3}\"><em>{statisticsInfo.OrderReturnNum}</em>条</a>"; } int productIsWarningStockNum = ProductHelper.GetProductIsWarningStockNum(HiContext.Current.Manager.StoreId); if (productIsWarningStockNum > 0) { string arg4 = "javascript:ShowSecondMenuLeft('商品','Product/ProductList.aspx','Product/ProductList.aspx?isWarningStock=1')"; this.hpkIsWarningStockNum.Text = $"<a href=\"{arg4}\"><em>{productIsWarningStockNum}</em>件</a>"; } this.lblBalance.Text = ((statisticsInfo.Balance > decimal.Zero) ? ("¥" + (statisticsInfo.Balance - statisticsInfo.ApplyRequestWaitDispose).F2ToString("f2")) : string.Empty); this.lblBalanceDrawRequested.Text = ((statisticsInfo.BalanceDrawRequested > decimal.Zero) ? ("¥" + statisticsInfo.BalanceDrawRequested.F2ToString("f2")) : string.Empty); this.lblApplyRequestWaitDispose.Text = ((statisticsInfo.ApplyRequestWaitDispose > decimal.Zero) ? ("¥" + statisticsInfo.ApplyRequestWaitDispose.F2ToString("f2")) : string.Empty); this.grdProducts.DataSource = SupplierHelper.GetTop10Product10Info(HiContext.Current.Manager.StoreId); this.grdProducts.DataBind(); }
private void btnAdd_Click(object sender, EventArgs e) { string address = Globals.StripAllTags(this.txtAddress.Text); string text = this.txtTel.Text; string text2 = this.txtContactMan.Text; ManagerInfo manager = HiContext.Current.Manager; SupplierInfo supplierById = SupplierHelper.GetSupplierById(manager.StoreId); if (!this.dropRegion.GetSelectedRegionId().HasValue) { this.ShowMsg("请选择供应商所在区域!", false); } else if (text2.Length > 8 || text2.Length < 2) { this.ShowMsg("请输入联系人,联系人长度必须是2-8位!", false); } else if (text == "" || !DataHelper.IsTel(text)) { this.ShowMsg("请输入正确的联系电话(手机或者固定电话)!", false); } else { supplierById.RegionId = this.dropRegion.GetSelectedRegionId().Value; supplierById.Tel = text; supplierById.Address = address; supplierById.ContactMan = text2; supplierById.WXOpenId = Globals.StripAllTags(this.txtWxOpenId.Text); supplierById.FullRegionPath = RegionHelper.GetFullPath(supplierById.RegionId, true); supplierById.Introduce = this.editDescription.Text; SupplierHelper.UpdateSupplier(supplierById); this.ShowMsg("保存成功", true); } }
protected override void OnLoad(EventArgs e) { if (!this.Page.IsPostBack) { base.DataSource = SupplierHelper.GetSupplierAll(this.MaxNum); base.DataBind(); } }
private void UpdateEditingSupplierUIValues() { var editedSupplier = MakeEditedSupplier(); var supplierTo = _editingSupplier.Model; SupplierHelper.DeepCopySupplierProperties(editedSupplier, supplierTo); _editingSupplier.UpdatePropertiesToUI(); }
private void CheckSupplierName(HttpContext context) { int supplierId = context.Request["supplierId"].ToInt(0); string supplierName = Globals.StripAllTags(context.Request["supplierName"]); string empty = string.Empty; empty = ((!SupplierHelper.ExistSupplierName(supplierId, supplierName)) ? "{\"success\":\"true\",\"msg\":\"\"}" : "{\"success\":\"false\",\"msg\":\"供应商名称已经存在,请重新输入!\"}"); this.ResponseEnd(empty); }
public void ExportExcel(HttpContext context) { BalanceDetailSupplierQuery dataQuery = this.GetDataQuery(context); SupplierInfo supplierById = SupplierHelper.GetSupplierById(dataQuery.SupplierId.Value); DbQueryResult balanceDetails4Report = BalanceHelper.GetBalanceDetails4Report(dataQuery); StringBuilder stringBuilder = new StringBuilder(300); stringBuilder.Append("供应商"); stringBuilder.Append(",时间"); stringBuilder.Append(",提现帐户"); stringBuilder.Append(",类型"); stringBuilder.Append(",订单号"); stringBuilder.Append(",收入"); stringBuilder.Append(",支出"); stringBuilder.Append(",账户余额"); stringBuilder.Append(",备注\r\n"); foreach (DataRow row in balanceDetails4Report.Data.Rows) { int requestId = row["OrderId"].ToInt(0); SupplierBalanceDrawRequestInfo balanceDrawRequestInfo = BalanceHelper.GetBalanceDrawRequestInfo(requestId); stringBuilder.Append(supplierById.SupplierName); stringBuilder.Append("," + row["TradeDate"]); if (balanceDrawRequestInfo != null) { string text = ""; text = ((!balanceDrawRequestInfo.IsWeixin) ? ((!balanceDrawRequestInfo.IsAlipay) ? $"提现到银行卡(开户银行:{balanceDrawRequestInfo.BankName},银行开户名:{balanceDrawRequestInfo.AccountName},银行卡帐号:{balanceDrawRequestInfo.MerchantCode})" : ("提现到支付宝(支付宝帐号:" + balanceDrawRequestInfo.AlipayCode + ",支付宝姓名:" + balanceDrawRequestInfo.AlipayRealName + ")")) : "提现到微信"); stringBuilder.Append("," + text); } else { stringBuilder.Append(","); } stringBuilder.Append("," + row["TradeTypeText"]); SupplierTradeTypes supplierTradeTypes = (SupplierTradeTypes)row["TradeType"].ToInt(0); if (supplierTradeTypes == SupplierTradeTypes.OrderBalance) { stringBuilder.Append("," + row["OrderId"]); } else { stringBuilder.Append(","); } stringBuilder.Append("," + row["Income"]); stringBuilder.Append("," + row["Expenses"]); stringBuilder.Append("," + row["Balance"]); stringBuilder.Append("," + row["Remark"] + "\r\n"); } context.Response.Clear(); context.Response.Buffer = false; context.Response.Charset = "GB2312"; context.Response.AppendHeader("Content-Disposition", "attachment;filename=BalanceDetail.csv"); context.Response.ContentEncoding = Encoding.GetEncoding("GB2312"); context.Response.ContentType = "application/octet-stream"; context.Response.Write(stringBuilder.ToString()); context.Response.End(); }
public void DeleteSupplier(T_Suppliers supplier) { try { sh = new SupplierHelper(); sh.delSupplier(supplier); } catch (Exception ex) { throw ex; } }
public List <T_Suppliers> getAllSupplier() { try { sh = new SupplierHelper(); return(sh.getSupplierList()); } catch (Exception ex) { throw ex; } }
public List <T_Base_suppliertype> getSuptypeLst() { try { sh = new SupplierHelper(); return(sh.getSuptypLst()); } catch (Exception ex) { throw ex; } }
public List <T_Suppliers_contacts> getSupplierContacts(int supplierid) { try { sh = new SupplierHelper(); return(sh.getSupplierContacts(supplierid)); } catch (Exception ex) { throw ex; } }
private DataGridViewModel <Dictionary <string, object> > GetDataList(SupplierQuery query) { DataGridViewModel <Dictionary <string, object> > dataGridViewModel = new DataGridViewModel <Dictionary <string, object> >(); if (query != null) { DbQueryResult supplierManagers = SupplierHelper.GetSupplierManagers(query); dataGridViewModel.rows = DataHelper.DataTableToDictionary(supplierManagers.Data); dataGridViewModel.total = supplierManagers.TotalRecords; } return(dataGridViewModel); }
/// <summary> /// 绑定供货商 /// </summary> private void BindSupplier() { DataTable supplierdt = SupplierHelper.GetSupplier(); ddcSupplier.DataTextField = "SupplierName"; ddcSupplier.DataValueField = "SupplierId"; ddcSupplier.DataSource = supplierdt; ddcSupplier.DataBind(); }
public T_Suppliers getSupplierbyId(int sid) { try { sh = new SupplierHelper(); return(sh.getSupplierbyId(sid)); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, System.EventArgs e) { if (!int.TryParse(this.Page.Request.QueryString["SupplierId"], out this.supplierId)) { base.GotoResourceNotFound(); return; } this.btnSave.Click += new System.EventHandler(this.btnEditShipper_Click); if (!this.Page.IsPostBack) { SupplierInfo shipper = SupplierHelper.GetSupplier(this.supplierId); if (shipper == null) { base.GotoResourceNotFound(); return; } Globals.EntityCoding(shipper, false); this.txtSupplierName.Text = shipper.SupplierName; this.txtShopName.Text = shipper.ShopName; this.txtSupplierCode.Text = shipper.SupplierCode; this.txtWarehouseName.Text = shipper.ShipWarehouseName; this.ddlReggion.SetSelectedRegionId(new int?(shipper.County)); this.txtAddress.Text = shipper.Address; this.txtPhone.Text = shipper.Phone; this.txtMobile.Text = shipper.Mobile; this.txtAddress.Text = shipper.Address; this.txtDescription.Text = shipper.Description; this.ckbApproveKey.Checked = shipper.ApproveKey; this.littlepic1.Src = shipper.Logo; this.fmSrc1.Value = shipper.Logo; this.littlepic2.Src = shipper.PCImage; this.fmSrc2.Value = shipper.PCImage; this.littlepic3.Src = shipper.MobileImage; this.fmSrc3.Value = shipper.MobileImage; this.txtSupplierOwnerName.Text = shipper.ShopOwner; txtContact.Text = shipper.Contact; txtEmail.Text = shipper.Email; txtFax.Text = shipper.Fax; txtCategory.Text = shipper.Category; txtBeneficiaryName.Text = shipper.BeneficiaryName; txtSwiftCode.Text = shipper.SwiftCode; txtBankAccount.Text = shipper.BankAccount; txtBankName.Text = shipper.BankName; txtBankAddress.Text = shipper.BankAddress; txtIBAN.Text = shipper.IBAN; TtxtRemark.Text = shipper.Remark; } }
protected override void AttachChildControls() { string url = this.Page.Request.QueryString["returnUrl"]; if (!string.IsNullOrWhiteSpace(this.Page.Request.QueryString["returnUrl"])) { this.Page.Response.Redirect(url); } Member member = HiContext.Current.User as Member; if (member == null) { this.Page.Response.Redirect("/Vshop/Login.aspx"); } this.rptProducts = (VshopTemplatedRepeater)this.FindControl("rptProducts"); this.litProFavCount = (System.Web.UI.WebControls.Literal) this.FindControl("litProFavCount"); this.litSuppFavCount = (System.Web.UI.WebControls.Literal) this.FindControl("litSuppFavCount"); this.txtTotal = (System.Web.UI.HtmlControls.HtmlInputHidden) this.FindControl("txtTotal"); int pageIndex; if (!int.TryParse(this.Page.Request.QueryString["page"], out pageIndex)) { pageIndex = 1; } int pageSize; if (!int.TryParse(this.Page.Request.QueryString["size"], out pageSize)) { pageSize = 8; } // ProductFavoriteQuery query = new ProductFavoriteQuery(); query.PageIndex = pageIndex; query.PageSize = pageSize; query.UserId = member.UserId; query.GradeId = member.GradeId; DbQueryResult dr = ProductBrowser.GetFavorites(query); this.rptProducts.DataSource = dr.Data; this.rptProducts.DataBind(); this.litProFavCount.Text = dr.TotalRecords.ToString(); this.litSuppFavCount.Text = SupplierHelper.GetUserSupplierCollectCount(member.UserId).ToString(); this.txtTotal.SetWhenIsNotNull(dr.TotalRecords.ToString()); PageTitle.AddSiteNameTitle("我的收藏"); }
public void addNewSupplier(T_Suppliers newsupplier) { try { sh = new SupplierHelper(); sh.addNewSupplier(newsupplier); } catch (Exception ex) { throw ex; } }
public void EditSupplier(T_Suppliers supplier) { try { sh = new SupplierHelper(); sh.updateSupplier(supplier); } catch (Exception ex) { throw ex; } }
public void DelSupplierContacts(T_Suppliers_contacts contact) { try { sh = new SupplierHelper(); sh.DelSupplierContacts(contact); } catch (Exception ex) { throw ex; } }
private void btnEditShipper_Click(object sender, System.EventArgs e) { SupplierInfo supplierInfo = new SupplierInfo(); supplierInfo.SupplierId = supplierId; supplierInfo.SupplierName = this.txtSupplierName.Text.Trim(); supplierInfo.ShopName = this.txtShopName.Text.Trim(); supplierInfo.SupplierCode = this.txtSupplierCode.Text.Trim(); supplierInfo.ShipWarehouseName = this.txtWarehouseName.Text.Trim(); if (!this.ddlReggion.GetSelectedRegionId().HasValue) { this.ShowMsg("请选择地区", false); return; } supplierInfo.County = this.ddlReggion.GetSelectedRegionId().Value; supplierInfo.Address = this.txtAddress.Text.Trim(); supplierInfo.Phone = this.txtPhone.Text.Trim(); supplierInfo.Mobile = this.txtMobile.Text.Trim(); supplierInfo.Description = this.txtDescription.Text.Trim(); supplierInfo.ApproveKey = this.ckbApproveKey.Checked; supplierInfo.ShopOwner = this.txtSupplierOwnerName.Text.Trim(); supplierInfo.Logo = this.fmSrc1.Value; supplierInfo.PCImage = this.fmSrc2.Value; supplierInfo.MobileImage = this.fmSrc3.Value; this.littlepic1.Src = supplierInfo.Logo; this.littlepic2.Src = supplierInfo.PCImage; this.littlepic3.Src = supplierInfo.MobileImage; supplierInfo.Contact = txtContact.Text.Trim(); supplierInfo.Email = txtEmail.Text.Trim(); supplierInfo.Fax = txtFax.Text.Trim(); supplierInfo.Category = txtCategory.Text.Trim(); supplierInfo.BeneficiaryName = txtBeneficiaryName.Text.Trim(); supplierInfo.SwiftCode = txtSwiftCode.Text.Trim(); supplierInfo.BankAccount = txtBankAccount.Text.Trim(); supplierInfo.BankName = txtBankName.Text.Trim(); supplierInfo.BankAddress = txtBankAddress.Text.Trim(); supplierInfo.IBAN = txtIBAN.Text.Trim(); supplierInfo.Remark = TtxtRemark.Text.Trim(); if (string.IsNullOrEmpty(supplierInfo.Phone) && string.IsNullOrEmpty(supplierInfo.Mobile)) { this.ShowMsg("手机号码和电话号码必填其一", false); return; } if (SupplierHelper.UpdateSupplier(supplierInfo)) { this.ShowMsg("修改成功", true); return; } this.ShowMsg("修改失败", false); }
protected override void AttachChildControls() { if (!int.TryParse(this.Page.Request.QueryString["supplierId"], out this.supplierId)) { base.GotoResourceNotFound("店铺已不存在"); } //店铺收藏数 this.litSupplierFavCount = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierFavCount"); //店铺logo this.imgSupplierLogo = (HiImage)this.FindControl("imgSupplierLogo"); this.isCollect = (System.Web.UI.WebControls.Literal) this.FindControl("isCollect"); //店铺名称 this.litSupplierName = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierName"); //店主名称 this.litSupplierOwner = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierOwner"); //店铺地址 this.litSupplierAddress = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierAddress"); //开店时间 this.litSupplierCreateTime = (System.Web.UI.WebControls.Literal) this.FindControl("litSupplierCreateTime"); Member member = HiContext.Current.User as Member; int userId = 0; if (member != null) { userId = member.UserId; } AppSupplierInfo info = SupplierHelper.GetAppSupplier(supplierId, userId); if (info != null) { this.litSupplierFavCount.Text = info.CollectCount > 0 ? info.CollectCount.ToString() : "0"; this.imgSupplierLogo.ImageUrl = info.Logo; this.litSupplierName.Text = info.ShopName; this.litSupplierOwner.Text = info.ShopOwner; this.isCollect.Text = info.IsCollect.ToString(); if (info.CreateDate.HasValue) { this.litSupplierAddress.Text = RegionHelper.GetFullRegion(info.County, ",").Split(',')[0]; } if (info.County > 0) { this.litSupplierCreateTime.Text = info.CreateDate.Value.ToString("yyyy-MM-dd HH:mm:ss"); } } else { base.GotoResourceNotFound("店铺已不存在"); } }
private void BindSupplier() { DbQueryResult productTypes = SupplierHelper.GetSupplier(new SupplierQuery { SupplierName = this.searchkey, PageIndex = this.pager.PageIndex, PageSize = this.pager.PageSize }); this.grdSupplier.DataSource = productTypes.Data; this.grdSupplier.DataBind(); this.pager.TotalRecords = productTypes.TotalRecords; }
private void grdSupplier_RowDeleting(object sender, System.Web.UI.WebControls.GridViewDeleteEventArgs e) { ManagerHelper.CheckPrivilege(Privilege.SupplierDelete); int supplierId = (int)this.grdSupplier.DataKeys[e.RowIndex].Value; if (SupplierHelper.DeleteSupplier(supplierId)) { this.BindSupplier(); this.ShowMsg("删除成功", true); return; } this.ShowMsg("删除失败", false); }
/// <summary> /// 绑定供应商 /// </summary> private void BindSySupplier() { this.dllSupper.Items.Clear(); this.dllSupper.Items.Add(new System.Web.UI.WebControls.ListItem("全部", string.Empty)); DataTable dt = SupplierHelper.GetSupplier(); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { this.dllSupper.Items.Add(new ListItem(dr["SupplierName"].ToString(), dr["SupplierId"].ToString())); } } }
public override void DataBind() { base.Items.Clear(); if (this.AllowNull) { base.Items.Add(new ListItem(this.NullToDisplay, string.Empty)); } IList <SupplierInfo> supplierAll = SupplierHelper.GetSupplierAll(0); foreach (SupplierInfo item2 in supplierAll) { ListItem item = new ListItem(item2.SupplierName, item2.SupplierId.ToString()); base.Items.Add(item); } }