private void Frm_CategProvee_Activated(object sender, EventArgs e) { _Mtd_Cargar(); _Er_Error.Dispose(); CONTROLES._Ctrl_Buscar._frm_Formulario = this; CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta_Formato = "Select ccatproveedor as Código,cnombre as Descripción from TCATPROVEEDOR"; CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta = "Select ccatproveedor,cnombre,ctcount,ctretencion,ctcountc,cglobal from TCATPROVEEDOR"; //CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta_Where = "c_id_departamento"; CONTROLES._Ctrl_Buscar._Str_Tabla = "TCATPROVEEDOR"; CONTROLES._Ctrl_Buscar._Str_Where_Vista_Grid = "cdelete='0'"; //------------------------------------------------------- _Ctrl_Controles[0] = _Txt_Cod; _Ctrl_Controles[1] = _Txt_Des; _Ctrl_Controles[2] = _Cbox_Cuenta; _Ctrl_Controles[3] = _Cbox_Contra; _Ctrl_Controles[4] = _Cbox_TipPro; //------------------------------------------------------- _Str_Campos[0] = "ccatproveedor"; _Str_Campos[1] = "cnombre"; _Str_Campos[2] = "ctcount"; _Str_Campos[3] = "ctcountc"; _Str_Campos[4] = "cglobal"; //------------------------------------------------------ _Str_Where[0] = "ccatproveedor"; //------------------------------------------------------- _Str_NoRep[0] = "0"; //------------------------------------------------------- _Str_Deshabi[0] = "0"; //------------------------------------------------------- _Int_CodDes[0] = 0; _Int_CodDes[1] = 1; //------------------------------------------------------- CONTROLES._Ctrl_Buscar._Ctrl_Controles = _Ctrl_Controles; CONTROLES._Ctrl_Buscar._Str_Campos = _Str_Campos; CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta_Where = _Str_Where; CONTROLES._Ctrl_Buscar._Er_Control_Error = _Er_Error; CONTROLES._Ctrl_Buscar._Dg_Datagrid = _Dg_Grid; CONTROLES._Ctrl_Buscar._Tb_Tab = _Tb_Tab; CONTROLES._Ctrl_Buscar._Str_NoseDebeRepetir = _Str_NoRep; CONTROLES._Ctrl_Buscar._Int_Codigo_Descripcion = _Int_CodDes; CONTROLES._Ctrl_Buscar._Bl_Modifi = false; CONTROLES._Ctrl_Buscar._Int_Foco = 5; CONTROLES._Ctrl_Buscar._txt_ExistForm.Text = "Abierto"; CONTROLES._Ctrl_Buscar._Bl_Especial = false; CONTROLES._Ctrl_Buscar._Str_Deshabilitados = _Str_Deshabi; CONTROLES._Ctrl_Buscar._Txt_TpoFind.Text = "N"; CLASES._Cls_Varios_Metodos _Cls_CL = new T3.CLASES._Cls_Varios_Metodos(_Ctrl_Controles); _Cls_CL._Mtd_Foco(); }
private void Frm_Zonadeventas_Activated(object sender, EventArgs e) { _Ctrl_Controles[0] = _Txt_Codigo; _Ctrl_Controles[1] = _Txt_Descripcion; _Ctrl_Controles[2] = _Cmb_Grupo; CONTROLES._Ctrl_Buscar._Txt_TpoFind.Text = "PA"; CONTROLES._Ctrl_Buscar._Ctrl_Controles = _Ctrl_Controles; CONTROLES._Ctrl_Buscar._Er_Control_Error = _Er_Error; CONTROLES._Ctrl_Buscar._Tb_Tab = _Tb_Tab; CONTROLES._Ctrl_Buscar._Bl_Especial = true; CONTROLES._Ctrl_Buscar._Bol_SoloNuevo = false; CONTROLES._Ctrl_Buscar._txt_ExistForm.Text = ""; CONTROLES._Ctrl_Buscar._txt_ExistForm.Text = "Abierto"; CONTROLES._Ctrl_Buscar._frm_Formulario = this; CLASES._Cls_Varios_Metodos _Cls_CL = new T3.CLASES._Cls_Varios_Metodos(_Ctrl_Controles); _Cls_CL._Mtd_Foco(); //____________________________________________ if (!_Txt_Descripcion.Enabled & _Txt_Descripcion.Text.Trim().Length > 0) { ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_guardar2.Enabled = false; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_borrar2.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_editar2.Enabled = true; } else if (!_Txt_Codigo.Enabled & _Txt_Codigo.Text.Trim().Length > 0 & _Txt_Descripcion.Enabled) { ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_guardar2.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_borrar2.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_editar2.Enabled = false; CONTROLES._Ctrl_Buscar._Bl_Modifi = true; } else if (_Txt_Codigo.Enabled) { ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_guardar2.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_borrar2.Enabled = false; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_editar2.Enabled = false; } //_____________________________________________ }
private void Frm_GrupoUsurario_Activated(object sender, EventArgs e) { _Er_Error.Dispose(); CONTROLES._Ctrl_Buscar._frm_Formulario = this; CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta_Formato = "Select cgroup as Código,cname as Descripción from TGROUP"; CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta = "Select cgroup,cname from TGROUP"; //CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta_Where = "c_id_departamento"; CONTROLES._Ctrl_Buscar._Str_Tabla = "TGROUP"; CONTROLES._Ctrl_Buscar._Str_Where_Vista_Grid = "cdelete='0'"; //------------------------------------------------------- _Ctrl_Controles[0] = _Txt_Cod; _Ctrl_Controles[1] = _Txt_Des; //------------------------------------------------------- _Str_Campos[0] = "cgroup"; _Str_Campos[1] = "cname"; //------------------------------------------------------ _Str_Where[0] = "cgroup"; //------------------------------------------------------- _Str_NoRep[0] = "0"; //------------------------------------------------------- _Str_Deshabi[0] = "0"; //------------------------------------------------------- _Int_CodDes[0] = 0; _Int_CodDes[1] = 1; //------------------------------------------------------- CONTROLES._Ctrl_Buscar._Ctrl_Controles = _Ctrl_Controles; CONTROLES._Ctrl_Buscar._Str_Campos = _Str_Campos; CONTROLES._Ctrl_Buscar._Str_Cadena_Consulta_Where = _Str_Where; CONTROLES._Ctrl_Buscar._Er_Control_Error = _Er_Error; CONTROLES._Ctrl_Buscar._Dg_Datagrid = _Dg_Grid; CONTROLES._Ctrl_Buscar._Tb_Tab = _Tb_Tab; CONTROLES._Ctrl_Buscar._Str_NoseDebeRepetir = _Str_NoRep; CONTROLES._Ctrl_Buscar._Int_Codigo_Descripcion = _Int_CodDes; CONTROLES._Ctrl_Buscar._Bl_Modifi = false; CONTROLES._Ctrl_Buscar._Int_Foco = 0; CONTROLES._Ctrl_Buscar._Bl_Especial = false; CONTROLES._Ctrl_Buscar._txt_ExistForm.Text = ""; CONTROLES._Ctrl_Buscar._txt_ExistForm.Text = "Abierto"; CONTROLES._Ctrl_Buscar._Str_Deshabilitados = _Str_Deshabi; CONTROLES._Ctrl_Buscar._Txt_TpoFind.Text = "N"; CLASES._Cls_Varios_Metodos _Cls_CL = new T3.CLASES._Cls_Varios_Metodos(_Ctrl_Controles); _Cls_CL._Mtd_Foco(); //____________________________________________ if (!_Txt_Cod.Enabled & !_Txt_Des.Enabled & _Txt_Cod.Text.Trim().Length > 0 & _Txt_Des.Text.Trim().Length > 0) { if (_Dg_Grid.Rows.Count > 0) { CONTROLES._Ctrl_Buscar._txt_text.Text = ""; CONTROLES._Ctrl_Buscar._txt_text.Text = "cgroup='" + _Txt_Cod.Text + "'"; } ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_guardar.Enabled = false; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_borrar.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_editar.Enabled = true; } else if (!_Txt_Cod.Enabled & _Txt_Des.Enabled) { CONTROLES._Ctrl_Buscar._Bl_Modifi = true; if (_Dg_Grid.Rows.Count > 0) { CONTROLES._Ctrl_Buscar._txt_text.Text = ""; CONTROLES._Ctrl_Buscar._txt_text.Text = "cgroup='" + _Txt_Cod.Text + "'"; } ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_guardar.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_borrar.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_editar.Enabled = false; } else if (_Txt_Cod.Enabled & _Txt_Des.Enabled) { ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_guardar.Enabled = true; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_borrar.Enabled = false; ((Frm_Padre)this.MdiParent)._Ctrl_Buscar1._Bt_editar.Enabled = false; } //_____________________________________________ }