public FormWindBase( ) { InitializeComponent( ); _model = new ProductionErpEntity.WindBaseEntity( ); _bll = new ProductionErpBll.Bll.WindBaseBll( ); tableView = new DataTable( ); Utility.GridViewMoHuSelect.SetFilter(gridView1); Utility.GridViewMoHuSelect.SetFilter(repositoryItemSearchLookUpEdit1View); FieldInfo fi = typeof(XPaint).GetField("graphics", BindingFlags.Static | BindingFlags.NonPublic); fi.SetValue(null, new DrawXPaint( )); barMenu.LinksPersistInfo.RemoveAt(toolExport.Id); barMenu.LinksPersistInfo.RemoveAt(toolPrint.Id); wait.Hide( ); gridView1.OptionsBehavior.Editable = false; tableGoods = _bll.tableGood( ); lupGoods.Properties.DataSource = tableGoods; lupGoods.Properties.DisplayMember = "WIB002"; lupGoods.Properties.ValueMember = "WIB001"; secUser.DataSource = tableGoods; secUser.DisplayMember = "WIB001"; secUser.ValueMember = "WIB001"; //lupUser . DataSource = tableGoods; //lupUser . DisplayMember = "WIB001"; //lupUser . ValueMember = "WIB"; }
/// <summary> /// 删除 /// </summary> /// <param name="table"></param> /// <returns></returns> public bool Delete(DataTable table) { Hashtable SQLString = new Hashtable( ); StringBuilder strSql = new StringBuilder( ); ProductionErpEntity.WindBaseEntity _model = new ProductionErpEntity.WindBaseEntity( ); for (int i = 0; i < table.Rows.Count; i++) { _model.idx = string.IsNullOrEmpty(table.Rows [i] ["idx"].ToString( )) == true ? 0 : Convert.ToInt32(table.Rows [i] ["idx"].ToString( )); strSql = new StringBuilder( ); strSql.AppendFormat("DELETE FROM MOXWIB WHERE idx={0}", _model.idx); SQLString.Add(strSql, null); } return(SqlHelper.ExecuteSqlTran(SQLString)); }