Пример #1
0
        private void textBoxContainButton2_Click(object sender, EventArgs e)
        {
            TextBoxContainButton        _txt = (TextBoxContainButton)sender;
            Dictionary <string, object> _ht  = new Dictionary <string, object>();

            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                string _columns = " ID=Role_ID,Desc_01=Desc_01 ";
                _ht = CommomHelper.GetQuery1("Role", _columns, "");
            }
            else
            {
                string _columns = " ID=Role_ID,Desc_01=Role_ID ";
                string _where   = "and UsrRole.Usr_id='" + LoginInfo._Usr_id + "'";
                _ht = CommomHelper.GetQuery1("UsrRole", _columns, _where);
            }
            if (_ht != null)
            {
                if (_ht.ContainsKey("ID") && _ht.ContainsKey("DESC"))
                {
                    _txt.ID   = _ht["ID"].ToString();
                    _txt.Desc = _ht["DESC"].ToString();
                    _txt.Text = _ht["DESC"].ToString();
                }
            }
        }
Пример #2
0
        private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=Usr_ID,Desc_01=Name ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            _ht = CommomHelper.GetQuery1("Usr1", _columns, "");
            if (_ht != null)
            {
                if (_ht.ContainsKey("ID") && _ht.ContainsKey("DESC"))
                {
                    _txt.ID   = _ht["ID"].ToString();
                    _txt.Desc = _ht["DESC"].ToString();
                    _txt.Text = _ht["DESC"].ToString();
                }
            }
        }
Пример #3
0
        private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _where                   = "and UsrCompany1.Usr_id='" + txtUsr.Text + "'";
            string _columns                 = " ID=Usr_Id,Desc_01=Usr_Id ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            _ht = CommomHelper.GetQuery1("UsrCompany1", _columns, _where);
            if (_ht != null)
            {
                if (_ht.ContainsKey("ID") && _ht.ContainsKey("DESC"))
                {
                    _txt.ID   = _ht["ID"].ToString();
                    _txt.Desc = _ht["DESC"].ToString();
                    _txt.Text = _ht["DESC"].ToString();
                }
            }
        }
Пример #4
0
        private void textBoxContainButton2_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _company_id              = string.IsNullOrEmpty(this.textBoxContainButton1.ID) ? "" : this.textBoxContainButton1.ID;
            string _where                   = "and UsrRole.Usr_id='" + txtUsr.Text + "' and UsrRole.Company_Id='" + _company_id + "' ";
            string _columns                 = " ID=Role_Id,Desc_01=Role_Id ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            _ht = CommomHelper.GetQuery1("UsrRole", _columns, _where);
            if (_ht != null)
            {
                if (_ht.ContainsKey("ID") && _ht.ContainsKey("DESC"))
                {
                    _txt.ID   = _ht["ID"].ToString();
                    _txt.Desc = _ht["DESC"].ToString();
                    _txt.Text = _ht["DESC"].ToString();
                }
            }
        }