/// <summary> /// 行绑定 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void List_RowDataBound(object sender, GridViewRowEventArgs e) { switch (e.Row.RowType) { //数据行 case DataControlRowType.DataRow: #region 数据绑定 #endregion break; case DataControlRowType.Footer: DropDownList UM = (DropDownList)e.Row.FindControl("UM"); using (ContractProvider contProvider = new ContractProvider()) { var table = contProvider.GetBaseParam("UM", ""); LocalGlobal.BindListItems(UM, table.DefaultView, "code", "code", false); } break; case DataControlRowType.EmptyDataRow: case DataControlRowType.Header: case DataControlRowType.Separator: case DataControlRowType.Pager: default: break; } }
/// <summary> /// 初始化 /// </summary> private void Initialize() { #region 页面内容 using (ContractProvider contProvider = new ContractProvider()) { var area = contProvider.GetBaseParam("AR", ""); LocalGlobal.BindListItems(rcarea, area.DefaultView, "Description", "Description", true); var payType = contProvider.GetBaseParam("PY", ""); LocalGlobal.BindListItems(rcterm, payType.DefaultView, "Description", "Description", true); var tradeCond = contProvider.GetBaseParam("TC", ""); LocalGlobal.BindListItems(rctrc, tradeCond.DefaultView, "Description", "Description", true); var curr = contProvider.GetBaseParam("CY", ""); LocalGlobal.BindListItems(rccur, curr.DefaultView, "Description", "Description", true); var tax = contProvider.GetBaseParam("TX", ""); LocalGlobal.BindListItems(rctax, tax.DefaultView, "Description", "Description", true); var sales = contProvider.GetBaseParam("CK", ""); LocalGlobal.BindListItems(rcsalr, sales.DefaultView, "Description", "Description", true); } #endregion if (this.CurrentID.Length == 0) { //新增 } else { //编辑 this.BindItem(); } }
/// <summary> /// 初始化 /// </summary> private void Initialize() { #region 页面内容 using (PurProvider purProvider = new PurProvider()) { var bomType = purProvider.GetBaseParam("PT", ""); LocalGlobal.BindListItems(BomType, bomType.DefaultView, "Description", "code", true); } this.ORDNO.Text = string.Empty; this.DRAWNO.Text = string.Empty; this.PRNo.Text = string.Empty; this.PRStatus.Text = string.Empty; //this.BomType.SelectedIndex = -1; #endregion //绑定列表 //this.BindList(); }