private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=ShippingAddress_ID,Desc_01=Desc_01 ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                _ht = CommomHelper.GetQuery1("ShippingAddress", _columns, "And isnull(ShippingAddress_Id,'')<>'" + this.txtDepNo.Text + "'");
            }
            else
            {
                string _where = "and ShippingAddress.Company_Id='" + LoginInfo._Usr_Company + "' And (Status_Id In ('130', '130'))  And isnull(ShippingAddress_Id,'')<>'" + this.txtDepNo.Text + "'";
                _ht = CommomHelper.GetQuery1("ShippingAddress", _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();
                }
            }
        }
        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();
                }
            }
        }
Esempio n. 3
0
        private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt = (TextBoxContainButton)sender;
            string _columns           = " ID=Warehouse_Id,Desc_01=Desc_01 ";

            Dictionary <string, object> _ht = new Dictionary <string, object>();

            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                _ht = CommomHelper.GetQuery1("Warehouse", _columns, "and Warehouse_Id not in('" + this.txtNo.Text + "') ");
            }
            else
            {
                string _where = "and Warehouse.Company_Id='" + LoginInfo._Usr_Company + "' and Warehouse_Id not in('" + this.txtNo.Text + "')";
                _ht = CommomHelper.GetQuery1("Warehouse", _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();
                }
            }
        }
Esempio n. 4
0
        private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=Notify_Id,Desc_01=Notify_Id ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                _ht = CommomHelper.GetQuery1("TaskNotifyOrder", _columns, "");
            }
            else
            {
                string _where = "and TaskNotifyOrder.Company_Id='" + LoginInfo._Usr_Company + "'";
                _ht = CommomHelper.GetQuery1("TaskNotifyOrder", _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();
                }
            }
        }
Esempio n. 5
0
        private void textBoxContainButton2_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=Employee_ID,Desc_01=Desc_01 ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();
            string PgmName = "Employee";

            if (_txt.Name == "Recipient_Employee_Ids" || _txt.Name == "CC_Employee_Ids")
            {
                PgmName = "Employee_MutSelect";
            }
            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                _ht = CommomHelper.GetQuery1(PgmName, _columns, "");
            }
            else
            {
                string _where = "and Employee.Company_Id='" + LoginInfo._Usr_Company + "' And (Status_Id In ('130', '130'))";
                _ht = CommomHelper.GetQuery1(PgmName, _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();
                }
            }
        }
Esempio n. 6
0
        private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=ProjectStage_Id,Desc_01=Desc_01 ";
            string _where                   = "AND  isnull(ProjectStage_Id,'')<>'" + this.txtNo.Text + "'";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                _ht = CommomHelper.GetQuery1("ProjectStage", _columns, _where);
            }
            else
            {
                _ht = CommomHelper.GetQuery1("ProjectStage", _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();
                }
            }
        }
Esempio n. 7
0
        private void textBoxContainButton3_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=ItemKind_ID,Desc_01=Desc_01 ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            if (LoginInfo._ZT_Admin_Id == "Z")
            {
                _ht = CommomHelper.GetQuery1("ItemKind", _columns, " And (Status_Id In ('130', '130')) ");
            }
            else
            {
                string _where = "and Department.Company_Id='" + LoginInfo._Usr_Company + "' And (Status_Id In ('130', '130'))";
                _ht = CommomHelper.GetQuery1("ItemKind", _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();
                }
            }
        }
Esempio n. 8
0
        private void textBoxContainButton2_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=Collection_Id,Desc_01=Collection_Id ";
            Dictionary <string, object> _ht = CommomHelper.GetQuery1("RequestCollectionOrder", _columns, "");

            if (_ht.ContainsKey("ID") && _ht.ContainsKey("DESC"))
            {
                _txt.ID   = _ht["ID"].ToString();
                _txt.Desc = _ht["DESC"].ToString();
                _txt.Text = _ht["DESC"].ToString();
            }
        }
Esempio n. 9
0
        private void textBoxContainButton1_Click(object sender, EventArgs e)
        {
            TextBoxContainButton _txt       = (TextBoxContainButton)sender;
            string _columns                 = " ID=ItemUt_ID,Desc_01=Desc_01 ";
            Dictionary <string, object> _ht = new Dictionary <string, object>();

            _ht = CommomHelper.GetQuery1("ItemUt", _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();
                }
            }
        }
Esempio n. 10
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
     {
         DataGridViewColumn _column   = dataGridView1.Columns[e.ColumnIndex];
         BindingSource      _bdSource = new BindingSource();
         _bdSource = dataGridView1.DataSource as BindingSource;
         if (_column.DataPropertyName == "ItemUnit_Id")
         {
             string _columns = " ID=ItemUt_ID,Desc_01=Desc_01 ";
             string _where   = "and (Status_Id In ('130', '130')) and ItemUt_Id not in ('" + _ItemUtId + "')";
             Dictionary <string, object> _ht = CommomHelper.GetQuery1("ItemUt", _columns, _where);
             if (_ht != null)
             {
                 if (_ht.ContainsKey("ID") && _ht.ContainsKey("DESC"))
                 {
                     this.dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = _ht["ID"].ToString();
                     _bdSource.EndEdit();
                 }
             }
         }
     }
 }