Example #1
0
 private void uiButton1_Click(object sender, EventArgs e)
 {
     try
     {
         if ((string)uiButton1.Tag == "FULL")
         {
             AddBatchJob(calendarCombo1.Value, "exec PLOfficeDistribUpdate");
         }
         else
         {
             foreach (Janus.Windows.GridEX.GridEXRow gsi in pLOfficeGridEX.GetCheckedRows())
             {
                 string plOfficeId = ((appDB.PLOfficeRow)(((DataRowView)gsi.DataRow).Row)).PLOfficeID.ToString();
                 AddBatchJob(calendarCombo1.Value, "exec PLOfficeDistribUpdateSingle " + plOfficeId);
             }
         }
         SaveBatchJob();
         if (MessageBox.Show("The Office Distribution Job(s) has(have) been successfully created.\n\nDo you want to display the Batch Job Review screen?", "Office Distribution Batch Job(s) Created", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == System.Windows.Forms.DialogResult.Yes)
         {
             if (!MainAdminForm.verifyOpenForm("fBatch"))
             {
                 fBatch f = new fBatch(this.ParentForm);
                 f.Show();
                 f.WindowState = FormWindowState.Maximized;
             }
         }
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            MainAdminForm frm = new MainAdminForm();

            frm.Show();
            this.Hide();
        }
Example #3
0
 private void ucBFCode1_SeriesLinkClicked(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
 {
     try
     {
         DataRow dr       = ((DataRowView)e.Column.GridEX.CurrentRow.DataRow).Row;
         int     seriesid = (int)dr["SeriesId"];
         MainAdminForm.MoreInfoSeries(seriesid);
     }
     catch (Exception x)
     {
         UIHelper.HandleUIException(x);
     }
 }
Example #4
0
        private void lblDefaultForm_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (CurrentRowTable() != null && !CurrentRowTable().IsDefaultFormIDNull())
            {
                //table rule
                lmDatasets.ActivityConfig.ACSeriesRow acsr = AtMng.acMng.DB.ACSeries.FindByACSeriesId(CurrentRowTable().DefaultFormID);

                if (acsr.GetActivityFieldRows().Length > 0)
                {
                    MainAdminForm.MoreInfoRelField(acsr.SeriesId, acsr.ACSeriesId, acsr.GetActivityFieldRows()[0].ActivityFieldID);
                }
                else
                {
                    MainAdminForm.MoreInfoACSeries(acsr.SeriesId, acsr.ACSeriesId);
                }
            }
        }
Example #5
0
        private void gridEX1_LinkClicked(object sender, Janus.Windows.GridEX.ColumnActionEventArgs e)
        {
            try
            {
                if (e.Column.Key == "StepCode")
                {
                    if (gridEX1.CurrentRow != null)
                    {
                        int acseriesid = (int)gridEX1.CurrentRow.Cells["ACSeriesId"].Value;
                        int seriesid   = (int)gridEX1.CurrentRow.Cells["SeriesId"].Value;
                        int afrid      = (int)gridEX1.CurrentRow.Cells["ActivityFieldID"].Value;

                        MainAdminForm.MoreInfoRelField(seriesid, acseriesid, afrid);
                    }
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
        private void Enter(object sender, RoutedEventArgs e)
        {
            var worker = Workers.FirstOrDefault(x => x.Login == Login);

            if (worker == null)
            {
                MessageBox.Show("Неверный логин! Попробуйте еще раз или обратитесь к администратору.");
            }
            else if (Password == worker.Password)
            {
                if (worker.UserType == Data.adminType)
                {
                    var result = MessageBox.Show("Войти как администратор?", "", MessageBoxButton.YesNo, MessageBoxImage.Question);
                    if (result == MessageBoxResult.Yes)
                    {
                        var adminForm = new MainAdminForm();
                        adminForm.Show();
                        Close();
                    }
                    else
                    {
                        Data.Instance.CurrentWorker = worker;
                        var viewOrder = new MainForm();
                        viewOrder.Show();
                        Close();
                    }
                }
                else
                {
                    Data.Instance.CurrentWorker = worker;
                    var viewOrder = new MainForm();
                    viewOrder.Show();
                    Close();
                }
            }
            else
            {
                MessageBox.Show("Неверный пароль! Попробуйте еще раз.");
            }
        }
Example #7
0
        private void button1_Click(object sender, EventArgs e)
        {
            if ((textBox1.Text.Equals(Administrator.Username)) && (textBox2.Text.Equals(Administrator.Password)))
            {
                Administrator admin = Administrator.GetObject();
                if (admin != null)
                {
                    MessageBox.Show("Добро пожаловать в систему!", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    MainAdminForm form = new MainAdminForm();
                    form.ShowDialog();
                }

                else
                {
                    MessageBox.Show("Ошибка входа в систему!", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            else if (!(textBox2.Text.Equals(Administrator.Password)))
            {
                MessageBox.Show("Неверный пароль!", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }