예제 #1
0
        /// <summary>Выбор позиции для светильника</summary>
        /// <param name="MainProcess"></param>
        /// <param name="mapInfo">Информация по карте</param>
        /// <param name="register">Номер регистра</param>
        /// <param name="lampBarCode">Штрихкод светильника</param>
        public SelectPosition(WMSClient MainProcess, MapInfo mapInfo, string register, string lampBarCode)
            : base(MainProcess, 1)
        {
            FormNumber = 1;
            BusinessProcessType = ProcessType.Registration;
            MainProcess.ToDoCommand = "Оберіть позицію";
            MapInfo = mapInfo;
            Register = register;
            LampBarCode = lampBarCode;

            IsLoad = true;
            DrawControls();
        }
예제 #2
0
        private void fillLikePrev()
        {
            DataTable table = null;

            using (SqlCeCommand command = dbWorker.NewQuery(@"
            SELECT m.Id MapId,m.Description,m.RegisterFrom,m.RegisterTo,c.Register
            FROM Cases c
            JOIN Maps m ON m.Id=c.Map
            WHERE c.Status=1
            ORDER BY DateOfActuality DESC"))
                {
                table = command.SelectToTable();
                }

            if (table != null && table.Rows.Count > 0)
                {
                DataRow row = table.Rows[0];
                MapInfo = new MapInfo(
                    row["MapId"], row[CatalogObject.DESCRIPTION].ToString(),
                    Convert.ToInt32(row["RegisterFrom"]), Convert.ToInt32(row["RegisterTo"]));
                Register = row["Register"].ToString();
                clearPosition();
                }
        }
예제 #3
0
파일: SelectMap.cs 프로젝트: AramisIT/Lamps
        /// <summary>Выбор строки в таблице</summary>
        private void onRowSelected(object sender, OnRowSelectedEventArgs e)
        {
            long mapId = Convert.ToInt64(e.SelectedRow["Id"]);

            //Если таблица - значит есть вложенные карты. Опять отобразить
            if (checkIncludeMapOrInfo(mapId))
                {
                MainProcess.ClearControls();
                MainProcess.Process = new SelectMap(MainProcess, mapId, LampBarCode);
                }
            //Иначе - результат (выбранная карта)
            else
                {
                object[] array = getMapInfo(mapId);
                int start = Convert.ToInt32(array[2]);
                int finish = Convert.ToInt32(array[3]);
                MapInfo = new MapInfo(array[0], array[1].ToString(), start, finish);

                MainProcess.ClearControls();
                MainProcess.Process = new InstallingNewLighter(MainProcess, LampBarCode) { MapInfo = MapInfo };
                }
        }