Пример #1
0
        public void SnackMode()
        {
            TBikeDAL MyDAL = new TBikeDAL();

            DetermineItemStatus();
            DataTable ResultTable = MyDAL.SelectAllSnackByDynamic(TBSnackID.Text, TBSnackName.Text, TBSnackStatus.Text, TBSnackType.Text);

            Column1.Header  = "Snack ID";
            Column1.Binding = new Binding("SnackID");
            Column2.Header  = "Snack Name";
            Column2.Binding = new Binding("SnackName");
            Column3.Header  = "Snack Type";
            Column3.Binding = new Binding("SnackType");
            Column4.Header  = "Snack Status";
            Column4.Binding = new Binding("SnackStatusInFull");
            Column5.Header  = "Snack Quantity";
            Column5.Binding = new Binding("Quantity");
            Column6.Header  = "Snack Price";
            Column6.Binding = new Binding("Price");
            Column7.Header  = "";
            Column8.Header  = "";
            Column9.Header  = "";
            Column10.Header = "";
            TBIkeUtility.TranslateRecordStatusDescription(new List <string> {
                "SnackStatus"
            }, ref ResultTable);
            dataGrid1.ItemsSource         = ResultTable.DefaultView;
            dataGrid1.IsReadOnly          = true;
            dataGrid1.AutoGenerateColumns = false;
        }