Пример #1
0
        private void tscSelect_Click(object sender, EventArgs e)
        {
            _teEntryNo = teEntryNo.Text.Trim();
            _lciStatus = txtArkCode.Text.Trim();
            GroupArkEntity queryEntity = new GroupArkEntity();
            DataSet        dsReturn    = queryEntity.QueryInfHaveArked(_teEntryNo, _lciStatus);
            DataTable      dt          = new DataTable();

            dt = dsReturn.Tables["AWMS_WH_ENTRY"];

            if (dt.Rows.Count > 0)
            {
                //if (!dt.Columns.Contains("ROWNUMBER"))
                //    dt.Columns.Add("ROWNUMBER");
                //for (int i = 0; i < dt.Rows.Count; i++)
                //{
                //    dt.Rows[i]["ROWNUMBER"] = i + 1;
                //}
                gcList.DataSource = dt;
                gcList.MainView   = gvList;
            }
        }
Пример #2
0
        private void gvList_MasterRowGetChildList(object sender, DevExpress.XtraGrid.Views.Grid.MasterRowGetChildListEventArgs e)
        {
            DataRow        dr          = this.gvList.GetDataRow(e.RowHandle);
            string         Key         = Convert.ToString(dr["ZMBLNR"]);
            GroupArkEntity queryEntity = new GroupArkEntity();
            DataSet        dsReturn    = queryEntity.QueryInfHaveArked(Key, _lciStatus);
            DataTable      dt          = new DataTable();

            dt = dsReturn.Tables["ARK_PALLET"];



            if (dt.Rows.Count > 0)
            {
                //if (!dt.Columns.Contains("ROWNUMBER"))
                //    dt.Columns.Add("ROWNUMBER");
                //for (int i = 0; i < dt.Rows.Count; i++)
                //{
                //    dt.Rows[i]["ROWNUMBER"] = i + 1;
                //}
                e.ChildList = dt.DefaultView;
            }
        }