예제 #1
0
 public PriceCalc()
 {
     InitializeComponent();
     SLDataDB.LoadData(queryOrd, out Orders);
     SLDataDB.LoadData(queryClnt, out Clients);
     ClntListLd();
 }
예제 #2
0
 public ManagersW()
 {
     InitializeComponent();
     SLDataDB.LoadData(queryMng, out MngrsIsh);
     Mng = MngrsIsh.Copy();
     UnXor();
 }
예제 #3
0
 private void Upd()
 {
     SLDataDB.LoadData(queryOrd, out Orders);
     SLDataDB.LoadData(queryMng, out Managers);
     SLDataDB.LoadData(queryClnt, out Clients);
     SLDataDB.LoadData(queryArchive, out Archive);
 }
예제 #4
0
 private void UpdInfo()
 {
     SLDataDB.LoadData(queryOrd, out Orders);
     SLDataDB.LoadData(queryMng, out Managers);
     SLDataDB.LoadData(queryClnt, out Clients);
     ManagerBx.Items.Clear();
     ClientsBx.Items.Clear();
     for (int i = 0; i < Managers.Rows.Count; i++)
     {
         ManagerBx.Items.Add(Managers.Rows[i][1]);
     }
     for (int i = 0; i < Clients.Rows.Count; i++)
     {
         ClientsBx.Items.Add(Clients.Rows[i][1]);
     }
 }
예제 #5
0
        public Manager()
        {
            int p = 0;

            MngID = Authorization.MngID;
            InitializeComponent();
            SLDataDB.LoadData(query, out Orders);
            SLDataDB.LoadData(queryClnts, out Clients);
            OrdersId = new int[Orders.Rows.Count];
            for (int i = 0; i < Orders.Rows.Count; i++)
            {
                if (MngID == Convert.ToInt32(Orders.Rows[i][5]))
                {
                    NumbersOrd.Text += Orders.Rows[i][0] + "\n";
                    OrdersId[p]      = Convert.ToInt32(Orders.Rows[i][0]);
                    p++;
                }
            }
        }
예제 #6
0
파일: Arhve.cs 프로젝트: Maslinolov/Diploms
 public Arhve()
 {
     InitializeComponent();
     SLDataDB.LoadData(queryArch, out Archive);
     dGV1.DataSource = Archive;
 }
예제 #7
0
 public Clients()
 {
     InitializeComponent();
     SLDataDB.LoadData(queryClnt, out Clnts);
     dGV1.DataSource = Clnts;
 }
예제 #8
0
 public ChangePassword()
 {
     InitializeComponent();
     SLDataDB.LoadData(queryOrd, out Admins);
 }
예제 #9
0
 public Services()
 {
     InitializeComponent();
     SLDataDB.LoadData(queryClnt, out Svcs);
     dGV1.DataSource = Svcs;
 }
예제 #10
0
 public SvcManager()
 {
     InitializeComponent();
     SLDataDB.LoadData(queryClnt, out Svcs);
     dataGridView1.DataSource = Svcs;
 }
예제 #11
0
        private void Auth_Click(object sender, EventArgs e)
        {
            if (Log.Text != "")
            {
                DataTable Table = new DataTable();
                if (Log.Text == "Администратор" || Log.Text == "Начальник отдела")
                {
                    string pss;
                    string query  = "SELECT * FROM Admins ORDER BY id";
                    string chkpas = Pass.Text;
                    SLDataDB.LoadData(query, out Table);
                    int  p;
                    bool chk = false;
                    switch (Log.Text)
                    {
                    case "Администратор":
                    {
                        p   = 0;
                        pss = Convert.ToString(Table.Rows[p][2]);
                        PasCheck(chkpas, pss, out chk);
                        if (chk)
                        {
                            this.Hide();
                            Admin g = new Admin();
                            g.ShowDialog();
                            this.Close();
                        }
                    }
                    break;

                    case "Начальник отдела":
                    {
                        p   = 1;
                        pss = Convert.ToString(Table.Rows[p][2]);
                        PasCheck(chkpas, pss, out chk);
                        if (chk)
                        {
                            this.Hide();
                            Head_of_Dep g = new Head_of_Dep();
                            g.ShowDialog();
                            this.Close();
                        }
                    }
                    break;
                    }
                }
                else
                {
                    if (Log.Text != "")
                    {
                        string pss    = "";
                        string query  = "SELECT * FROM Managers ORDER BY Id";
                        string chkpas = Pass.Text;
                        SLDataDB.LoadData(query, out Table);
                        bool chk = false;
                        int  p   = 0;
                        for (int i = 0; i < Table.Rows.Count; i++)
                        {
                            string LT     = Log.Text;
                            string BDSrnm = Convert.ToString(Table.Rows[i][1]);
                            for (int k = 0; k < LT.Length; k++)
                            {
                                if (LT[k] == BDSrnm[k])
                                {
                                    chk = true;
                                }
                                else
                                {
                                    chk = false;
                                    break;
                                }
                            }
                            if (chk)
                            {
                                pss = Convert.ToString(Table.Rows[i][3]);
                                p   = i;
                                break;
                            }
                        }
                        if (chk == false)
                        {
                            WrongPass g = new WrongPass();
                            g.ShowDialog();
                        }
                        if (chk)
                        {
                            PasCheck(chkpas, pss, out chk);
                        }
                        ;
                        if (chk)
                        {
                            MngID = Convert.ToInt32(Table.Rows[p][0]);
                            this.Hide();
                            Manager g = new Manager();
                            g.ShowDialog();
                            this.Close();
                        }
                    }
                }
            }
        }