Esempio n. 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            LoginForm login = new LoginForm();

            if (login.ShowDialog() == DialogResult.OK)
            {
                OMWorkBench.BaseInfoDS  = login.BaseInfoDataSet;
                OMWorkBench.CurrentInfo = login.SelfInfoDataSet;
                DataRow loginRow = login.SelfInfoDataSet.Tables["login"].Rows[0];
                OMWorkBench.AgentId    = Convert.ToInt32(loginRow["id"]);
                OMWorkBench.AgentName  = loginRow["name"].ToString();
                OMWorkBench.Balance    = Convert.ToDecimal(loginRow["balance"]);
                OMWorkBench.MangerId   = Convert.ToInt32(loginRow["id1"]);
                OMWorkBench.MangerName = loginRow["name1"].ToString();
                OMWorkBench.AreaId     = Convert.ToInt32(loginRow["area_id"]);
                OMWorkBench.Grade      = Convert.ToInt32(loginRow["grade"]);
                OMWorkBench.Rights     = OMWorkBench.StrToBitStr(Convert.ToString(loginRow["rights"]));
            }
            else
            {
                return;
            }
            Application.Run(OMWorkBench.MainForm);
        }
Esempio n. 2
0
 private void RightSetForm_Load(object sender, EventArgs e)
 {
     OKBtn.Enabled = OMWorkBench.ModifyManager;
     for (int i = 0; i < _rightStr.Length; i++)
     {
         char rightArr = _rightStr[i];
         _bitArrayStr += Convert.ToString(rightArr, 2).PadLeft(8, '0');
     }
     BitArrayStr = OMWorkBench.StrToBitStr(_rightStr);
 }