示例#1
0
        public ChangeQuestionView(string _value, ControlPanelView _cp, UserModel _um)
        {
            InitializeComponent();

            if (_value.Equals("question"))
            {
                panel2.Visible = true;
                this.Text      = "Изменение секретного вопроса - Bona Fides";
            }
            else
            {
                panel1.Visible = true;
                this.Text      = "Изменение ответа - Bona Fides";
            }

            phaseChangingAnswer   = 1;
            phaseChangingQuestion = 1;

            controlControlPanelView = _cp;
            um = _um;

            label3.Text = "Вопрос: " + um.SecretQuestion;
            label4.Text = "Вопрос: " + um.SecretQuestion;

            controlSecuredPasswordController = new SecuredPasswordController();
            controlLoginFormController       = new LoginFormController(this);
        }
示例#2
0
        public RegisterAnEmployeeView(MainFormView _mf)
        {
            InitializeComponent();
            tb_Name.Focus();

            mf           = _mf;
            lfController = new LoginFormController(this);
            spController = new SecuredPasswordController();
        }
示例#3
0
 public RestorePasswordView(LoginFormView _lf)
 {
     InitializeComponent();
     lfController         = new LoginFormController(this);
     spControl            = new SecuredPasswordController();
     controlLoginFormView = _lf;
     ChangedSuccessfully  = false;
     label1.Text          = message1;
     phase = 1;
 }
示例#4
0
        public ShowUsersView(MainFormView _mf)
        {
            InitializeComponent();
            mf = _mf;

            lfController = new LoginFormController(this);
            dbSuccess    = false;

            GetStarted();
        }
示例#5
0
        public ControlPanelView(UserModel _um, MainFormView _mf)
        {
            InitializeComponent();
            controlMainFormView = _mf;
            um = _um;

            loginFormController = new LoginFormController(this);

            lb_Name.Text     = um.Name;
            lb_Login.Text    = um.Login;
            lb_Question.Text = um.SecretQuestion;
            lb_Role.Text     = loginFormController.GetUserRoleName(um.UserRoleId);
        }
示例#6
0
        public RestorePasswordView(ControlPanelView _cp, UserModel _um)
        {
            InitializeComponent();
            lfController            = new LoginFormController(this);
            spControl               = new SecuredPasswordController();
            controlControlPanelView = _cp;
            um = _um;

            ChangedSuccessfully = false;
            label1.Text         = message2;
            phase             = 2;
            tb_Input1.Visible = false;
            tb_Input2.Visible = true;
            label2.Visible    = true;
            label1.Text       = message2;
            label2.Text       = um.SecretQuestion;
            this.Text         = "Изменение пароля";
            tb_Input2.Focus();
        }
示例#7
0
        /* Конструктор */
        public LoginFormView()
        {
            //показывает картинку при запуске программы
            //StartImage startImg = new StartImage();
            //startImg.Show();
            //this.Refresh();
            //startImg.Refresh();
            //System.Threading.Thread.Sleep(2000);
            //startImg.Close();
            //перестали показывать картинку при запуске программы

            int prC = 0;

            foreach (Process pr in Process.GetProcesses())
            {
                if (pr.ProcessName == "Bona Fides")
                {
                    prC++;
                }
            }
            if (prC > 1)
            {
                MessageBox.Show("Приложение уже запущено!", "Ошибка");
                Process.GetCurrentProcess().Kill();
            }

            InitializeComponent();

            string UserName = Environment.UserName;

            path = @"C:\Users\" + Environment.UserName + @"\AppData\Local\secure.txt";

            ReSignIn         = false; //если хотим не закрыть программу, а перезайти с главной формы
            firstLoad        = true;
            SignInWithSaveMe = false;
            lfController     = new LoginFormController(this);
            sp = new SecuredPasswordController();
            LoadLogin();
        }
示例#8
0
        /* Конструктор */
        public LoggerView(MainFormView _mf, UserModel _um)
        {
            InitializeComponent();


            firstRun  = true;
            startDate = DateTime.Today;
            //endDate = DateTime.Now;
            endDate = DateTime.Today.AddHours(23).AddMinutes(59);

            asinFilter             = false;
            skuFilter              = false;
            productNameFilter      = false;
            creationUserNameFilter = false;

            productIdForFilter = creationUserIdForFilter = -1;
            asinForFilter      = skuForFilter = "Все";

            previousCountOfLogs = 0;
            connection          = DBData.GetDBConnection();
            mf        = _mf;
            userModel = _um;

            notifyIcon1.Visible = true;

            pList   = new List <ProductsModel> {
            };
            mpList  = new List <MarketplaceModel> {
            };
            logList = new List <LoggerModel> {
            };
            uList   = new List <UserModel> {
            };

            uniqueProductNames = new List <string> {
            };
            uniqueASINs        = new List <string> {
            };

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

            lb_StartDate.Text = startDate.ToString().Substring(0, 10);
            lb_EndDate.Text   = endDate.ToString().Substring(0, 10);
            label4.Text       = "С " + startDate.ToString().Substring(0, 10);
            label5.Text       = "По " + endDate.ToString().Substring(0, 10);


            mpController.GetMarketplaces();

            pController.GetProductsAllJOIN();
            Fill_CB_ByProducts();

            lfController.GetAllUsers();
            Fill_CB_ByUsers();

            logController.GetAllRecordsByDate(startDate, endDate);
            if (logList.Count > 0)
            {
                label6.Visible      = false;
                dgv_Log.Visible     = true;
                previousCountOfLogs = logList.Count;
                Draw_dgv_Logs();
            }

            timer1.Enabled = true;
            timer1.Start();
        }