Пример #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            NewUser f = new NewUser();

            if (
                MessageBox.Show("Пользователь выполняющий данное действие должен обладать ролью sa_role или sso_role.\nПродолжить?", "ВНИМАНИЕ", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            {
                if (f.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        com.setCommand("mAddUser");
                        com.AddParam(f.GetLastName());
                        com.AddParam(f.GetFirstName());
                        com.AddParam(f.GetMidName());
                        com.AddParam(f.GetLogin());
                        com.AddParam(f.GetPhones());
                        com.AddParam(f.GetPost());

                        com.ExecuteCommand();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                    GetOfficers();
                }
            }
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < vGridControl1.Rows.Count; i++)
            {
                com.setCommand("mSetASParam");
                com.AddParam(SystemID); com.AddParam(IDinSystem);
                com.AddParam(int.Parse(vGridControl1.Rows[i].Name)); com.AddParam(vGridControl1.Rows[i].Properties.Value);

                try
                {
                    com.ExecuteCommand();
                }
                catch (Exception ex)
                {
                    throw new Exception(ex.Message);
                }
            }
            MessageBox.Show("Доп.параметры сохранены");
        }
Пример #3
0
 private void SaveUserParams()
 {
     com.setCommand("mSaveUserProperty");
     for (int i = 0; i < vGridControl1.Rows.Count; i++)
     {
         com.clearParams();
         com.AddParam(GetRowID(i)); com.AddParam(GetWPPID(i)); com.AddParam(GetRowValue(i));
         try
         {
             com.ExecuteCommand();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }