Beispiel #1
0
        /* Открываем на редактирование */
        public LoggerShow(LoggerView _lv, object _lm, string _userName, string _pName, string _asin, string _sku, string _mpName, string _eUserName)
        {
            InitializeComponent();

            loggerViewControl = _lv;
            logModel          = (LoggerModel)_lm;
            logController     = new LoggerController(this);

            imageList = new List <ImageModel> {
            };

            lb_Asin.Text        = ASIN = _asin;
            lb_cUser.Text       = userName = _userName;
            lb_editDate.Text    = logModel.EditDate.ToString().Substring(0, 10);
            lb_editUser.Text    = editUserName = _eUserName;
            lb_marketPlace.Text = marketplaceName = _mpName;
            lb_ProductName.Text = productName = _pName;
            lb_Sku.Text         = SKU = _sku;
            _lbcDate.Text       = logModel.CreationDate.ToString().Substring(0, 10);
            richTextBox1.Text   = logModel.Text;

            this.Text = "Просмотр записи";
            editMode  = false;

            LoadImages();
            DrawPictures();
        }
Beispiel #2
0
        private void LoggerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            LoggerView lv = new LoggerView(this, um);

            lv.Show();
            this.Visible = false;
        }
Beispiel #3
0
        /* Фоновый процесс при свернутом окне логгера */
        public LoggerNotification(LoggerView _lv, object _lm, string _userName, string _pName, string _asin, string _sku, string _mpName, string _eUserName, string _text, int _AppUserId)
        {
            InitializeComponent();

            loggerViewForm  = _lv;
            logModel        = (LoggerModel)_lm;
            userName        = _userName;
            productName     = _pName;
            ASIN            = _asin;
            SKU             = _sku;
            marketPlaceName = _mpName;
            editUserName    = _eUserName;
            text            = _text;
            appUserId       = _AppUserId;

            FromMainForm = false;

            label1.Text = userName + " к товару \"" + productName + "\":";
            label3.Text = text;

            this.TopMost = true;

            this.Height   = label3.Location.Y + label3.Height + 10;
            this.Location = new Point(Screen.PrimaryScreen.WorkingArea.Width - this.Width, Screen.PrimaryScreen.WorkingArea.Height - this.Height);

            try
            {
                SoundPlayer audio = new SoundPlayer(Resources.notification2);
                audio.Stream.Position = 0;
                audio.Play();
            } catch (Exception ex) { }

            timer1.Start();
        }
Beispiel #4
0
        public LoggerAdd(LoggerView _mf, UserModel _um)
        {
            InitializeComponent();
            loggerViewControl = _mf;

            creationDate = DateTime.Now;

            uList = _um;

            pList              = new List <ProductsModel> {
            };
            mpList             = new List <MarketplaceModel> {
            };
            logList            = new List <LoggerModel> {
            };
            uniqueProductNames = new List <string> {
            };
            imageNamesForSave  = new List <string> {
            };
            asinSkuPairs       = new List <LoggerAddAsinSkuPairs> {
            };

            pController   = new ProductsController(this);
            mpController  = new MarketplaceController(this);
            logController = new LoggerController(this);

            lb_creationDate.Text     = creationDate.ToString().Substring(0, 10);
            lb_CreationUserName.Text = uList.Name;


            mpController.GetMarketplaces();

            pController.GetProductsAllJOIN();
            pList = pList.Distinct().ToList <ProductsModel>();
            Fill_CB_ByProducts();



            pbList = new List <PictureBox> {
            };
            pbList.Add(pictureBox1);
            pbList.Add(pictureBox2);
            pbList.Add(pictureBox3);
            pbList.Add(pictureBox4);
            pbList.Add(pictureBox5);
            pbList.Add(pictureBox6);
            pbList.Add(pictureBox7);
            pbList.Add(pictureBox8);
            pbList.Add(pictureBox9);
            pbList.Add(pictureBox10);
        }
Beispiel #5
0
 /* Конструктор */
 public ProductsController(LoggerView _controlForm)
 {
     connection            = DBData.GetDBConnection();
     controlFormLoggerView = _controlForm;
 }
 public MarketplaceController(LoggerView _mf)
 {
     connection        = DBData.GetDBConnection();
     controlLoggerView = _mf;
 }
Beispiel #7
0
 public LoginFormController(LoggerView _cp)
 {
     connection        = DBData.GetDBConnection();
     controlLoggerView = _cp;
 }
Beispiel #8
0
 public LoggerController(LoggerView _mf)
 {
     connection            = DBData.GetDBConnection();
     controlFormLoggerView = _mf;
 }