Ejemplo n.º 1
0
 private void BtnUpd_Click(object sender, EventArgs e)
 {
     if (this.dataGridView1 != null && this.dataGridView1.Rows.Count > 0)
     {
         if (dataGridView1.CurrentRow != null)
         {
             string          _Company_Id  = "";
             string          _Currency_Id = "";
             DataGridViewRow _dr          = this.dataGridView1.Rows[dataGridView1.CurrentRow.Index];
             if (_dr != null)
             {
                 _Company_Id  = string.IsNullOrEmpty(_dr.Cells["Company_Id"].Value.ToString()) ? "" : (_dr.Cells["Company_Id"].Value.ToString()).ToString();
                 _Currency_Id = string.IsNullOrEmpty((_dr.Cells["Currency_Id"].Value.ToString()).ToString()) ? "" : (_dr.Cells["Currency_Id"].Value.ToString()).ToString();
             }
             CurrencyManage _Manage = new CurrencyManage();
             _Manage.Edit        = "UPD";
             _Manage.Company_Id  = _Company_Id;
             _Manage.Currency_Id = _Currency_Id;
             if (_Manage.ShowDialog() != DialogResult.OK)
             {
                 string _where = " Where 1=1 and Company_Id='" + LoginInfo._Usr_Company + "'";
                 QueryData(_where);
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void CurrencyForm_Load(object sender, EventArgs e)
 {
     this.dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells;
     this.dataGridView1.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
     this.dataGridView1.AutoSizeColumnsMode        = DataGridViewAutoSizeColumnsMode.Fill;
     this.textBoxContainButton1.ButtonSelectClick += textBoxContainButton1_Click;
     this.textBoxContainButton2.ButtonSelectClick += textBoxContainButton1_Click;
     this.textBoxContainButton1.TextEnter         += textBoxContainButton1_TextEnter;
     this.textBoxContainButton1.TextLeave         += textBoxContainButton1_TextLeave;
     this.textBoxContainButton2.TextEnter         += textBoxContainButton1_TextEnter;
     this.textBoxContainButton2.TextLeave         += textBoxContainButton1_TextLeave;
     if (this.dataGridView1 != null && this.dataGridView1.Rows.Count > 0)
     {
         if (dataGridView1.CurrentRow != null)
         {
             string          _Company_Id  = "";
             string          _Currency_Id = "";
             DataGridViewRow _dr          = this.dataGridView1.Rows[dataGridView1.CurrentRow.Index];
             if (_dr != null)
             {
                 _Company_Id  = string.IsNullOrEmpty(_dr.Cells["Company_Id"].Value.ToString()) ? "" : (_dr.Cells["Company_Id"].Value.ToString()).ToString();
                 _Currency_Id = string.IsNullOrEmpty((_dr.Cells["Currency_Id"].Value.ToString()).ToString()) ? "" : (_dr.Cells["Currency_Id"].Value.ToString()).ToString();
             }
             CurrencyManage _Manage = new CurrencyManage();
             _Manage.Edit = "UPD";
             if (_Manage.ShowDialog() != DialogResult.OK)
             {
                 string _where = " Where 1=1 and Company_Id='" + LoginInfo._Usr_Company + "'";
                 QueryData(_where);
             }
         }
     }
 }
Ejemplo n.º 3
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            CurrencyManage _Manage = new CurrencyManage();

            _Manage.Edit = "ADD";
            if (_Manage.ShowDialog() != DialogResult.OK)
            {
                string _where = " Where 1=1 and Company_Id='" + LoginInfo._Usr_Company + "'";
                QueryData(_where);
            }
        }