Пример #1
0
        private void Insert_Station_From_View()
        {
            DataAccessPOS dbPOS = new DataAccessPOS();

            //if (String.IsNullOrEmpty(txt_ConfigName.Text)) txt_ConfigName.Text = "";
            //if (String.IsNullOrEmpty(txt_ConfigValue.Text)) txt_ConfigValue.Text = "";
            //if (String.IsNullOrEmpty(txt_ConfigDesc.Text)) txt_ConfigDesc.Text = "";

            stations.Clear();
            stations.Add(new POS_StationModel()
            {
                ComputerName = txt_HostName.Text,
                Station      = txt_Station.Text,
                StationName  = txt_StationName.Text,
                IP_Addr      = txt_IPAddr.Text,
                StationNo    = int.Parse(txt_StationNo.Text),
                IPS_Port     = int.Parse(txt_IPS_Port.Text),
                Enabled      = check_IsActive.Checked
            });
            int iProdCnt = dbPOS.Insert_Station(stations[0]);
        }