public fTown() { InitializeComponent(); //CTLM definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddNetworkSedes"; CTLM.sSPUpp = "pUppNetworkSedes"; CTLM.sSPDel = "pDelNetworkSedes"; CTLM.AddItem(cboCOD3, "COD3", true, true, true, 1, true, true); CTLM.AddItem(txtSubNet, "SubNet", true, true, false, 0, false, true); CTLM.AddItem(txtMask, "Mask", true, true, false, 0, false, false); CTLM.AddItem(txtExternalIP, "ExternalIP", true, true, false, 0, false, false); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "NetworkSedes"; CTLM.Start(); cboCOD3.Source("Select COD3,Nombre from vSedes", txtCOD3Name); //cboCOD3.SelectedValue = ""; //CTLM.AfterButtonClick += delegate(object source, CTLMEventArgs e) // { // if (e.ButtonClick== "btnCancel") // { // txtCOD3Name.Text = ""; // } // }; }
//private string _prevStatus; public fFlags() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddFlags"; CTLM.sSPUpp = "pUppFlags"; CTLM.sSPDel = "pDelFlags"; CTLM.AddItem(txtIdReg, "IdReg", false, true, false, 0, true, true); CTLM.AddItem(cboTable, "Tabla", true, true, true, 1, false, true); CTLM.AddItem(txtSection, "Section", true, true, true, 2, false, true); CTLM.AddItem(txtLetter, "Letra", true, true, false, 0, false, true); CTLM.AddItem(txtCode, "Codigo", true, true, true, 3, false, true); CTLM.AddItem(txtDescFlag, "DescFlag", true, true, false, 0, false, true); CTLM.AddItem(txtDesFlagEng, "DescFlagEng", true, true, false, 0, false, true); CTLM.AddItem(lstServices, "Servicio", true, true, false, 0, false, true); CTLM.AddItem(lstRequired, "DependencyFlags", true, true, false, 0, false, true); CTLM.AddItem(lstIncompatible, "IncompatibleFlags", true, true, false, 0, false, true); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "vFlags"; lstServices.Source("select ServiceCode,ServiceCode as 'DESC' from services order by servicecode, Description"); lstRequired.Source(string.Format("select DescFlagEng from vFlags where tabla='{0}' and Section='{1}' order by Codigo", cboTable.Value, txtSection.Value)); lstIncompatible.Source(string.Format("select DescFlagEng from vFlags where tabla='{0}' and Section='{1}' order by Codigo", cboTable.Value, txtSection.Value)); cboTable.Source("select name from sistemas.sys.tables where is_ms_shipped=0 order by name"); CTLM.Start(); cboTable.ComboBox.SelectedValueChanged += ComboBox_SelectedValueChanged; txtSection.Validated += TxtSection_Validated; CTLM.AfterButtonClick += CTLM_AfterButtonClick; }
public fServices() { InitializeComponent(); CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddServices"; CTLM.sSPUpp = "pUppServices"; CTLM.sSPDel = "pDelServices"; CTLM.AddItem(txtServiceCode, "ServiceCode", true, true, true, 1, true, true); CTLM.AddItem(txtVersion, "version", true, true, false, 0, false, false); CTLM.AddItem(txtDescription, "Description", true, true, false, 0, false, true); CTLM.AddItem(txtDB, "DB", true, true, false, 0, false, true); CTLM.AddItem(txtLocation, "Location", true, true, false, 0, false, true); CTLM.AddItem(txtApp, "App", true, true, false, 0, false, true); CTLM.AddItem(txtServer1, "Server1", true, true, false, 0, false, true); CTLM.AddItem(txtServer2, "Server2", true, true, false, 0, false, true); CTLM.AddItem(txtActiveServer, "ActiveServer", true, true, false, 0, false, true); CTLM.AddItem(lstFlags, "flags", true, true, false, 0, false, true); CTLM.AddItem(lstCOD3, "COD3", true, true, false, 0, false, true); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "Services"; lstFlags.Source("select codigo,DescFlagEng from flags where tabla='Services' order by codigo"); lstCOD3.Source("select n.COD3,s.descripcion from NetworkSedes n inner join general..sedes s on n.cod3=s.cod3 order by n.cod3"); CTLM.Start(); CTLM.AfterButtonClick += CTLM_AfterButtonClick; CTLM.BeforeButtonClick += CTLM_BeforeButtonClick; }
public fSuppliers() { InitializeComponent(); //CTLM definitions CTLM.Conn = gDatos; CTLM.sSPAdd = "pMasterSuppliersAdd"; CTLM.sSPUpp = "pMasterSuppliersUpp"; CTLM.sSPDel = "pMasterSuppliersDel"; CTLM.AddItem(txtCode, "SupplierCode", CTLMControlTypes.PK); CTLM.AddItem(txtDescription, "Description", CTLMControlTypes.AddUppSearch); CTLM.AddItem(cboInternalCompanyCode, "InternalCompanyCode", CTLMControlTypes.AddUppSearch); CTLM.AddItem(cboCOD3, "Cod3", CTLMControlTypes.AddUppSearch); CTLM.AddItem(lstFlags, "Flags", CTLMControlTypes.AddUppNoSearch); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "MasterSuppliers"; CTLM.ReQuery = true; lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='MasterCustomers'"); cboInternalCompanyCode.Source("select InternalCompanyCode,Name from InternalCompanies order by InternalCompanyCode", txtInternalCompanyDescription); cboInternalCompanyCode.ValueChanged += CboInternalCompanyCode_ValueChanged; cboCOD3.Source(string.Format("select distinct MainCod3,BranchName from InternalCompanyBranches where InternalCompanyCode='{0}' order by MainCod3", cboInternalCompanyCode.Value), txtCOD3Description); CTLM.Start(); }
public fTasks() { InitializeComponent(); //CTLM definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddCabTareas"; CTLM.sSPUpp = "pUppCabTareas"; CTLM.sSPDel = "pDelCabTareas"; //ctlm fields CTLM.AddItem(txtIdTarea, "idTarea", false, true, true, 1, true, true); CTLM.AddItem(txtIT, "ITWorker", true, true, false, 0, false, true); CTLM.AddItem(txtPerson, "Person", true, true, false, 0, false, true); CTLM.AddItem(cboPlaceAdvise, "PlaceAdvise", true, true, false, 0, false, true); CTLM.AddItem(txtPlaceAdvise, "DesPlaceAdvise", CTLMControlTypes.NoSearch); CTLM.AddItem(cboPlaceAffected, "PlaceAffected", true, true, false, 0, false, true); CTLM.AddItem(txtPlaceAffected, "DesPlaceAffected", CTLMControlTypes.NoSearch); CTLM.AddItem(cboService, "ServiceAffected", true, true, false, 0, false, true); CTLM.AddItem(cboMatter, "Matter", true, true, false, 0, false, true); //CTLM.AddItem(txt, "DesPlaceAffected"); CTLM.AddItem(dateStart, "StartTime", true, true, false, 0, false, true); CTLM.AddItem(dateEnd, "EndTime", true, true, false, 0, false, true); CTLM.AddItem(txtKm, "Km", true, true, false, 0, false, true); CTLM.AddItem(txtNotes, "Notes", true, true, false, 0, false, true); CTLM.AddItem(chkFlags, "flags", true, true, false, 0, false, true); //combo definitions cboPlaceAdvise.Source("Select cod3,Nombre from vSedes", txtPlaceAdvise); cboPlaceAffected.Source("Select cod3,Nombre from vSedes", txtPlaceAffected); cboPlaceAffected.ComboBox.SelectedValueChanged += delegate { cboService.Source("Select codigoservicio from vServiciosSedes where cod3 = '" + cboPlaceAffected.Value + "'"); }; //cboService.Source("");// Select codigoservicio from vServiciosSedes where cod3 = '" + txtPlaceAffected.Text + "' cboMatter.Source("Select Codigo from materias"); //Defaults cboPlaceAdviseDef.Source("Select cod3 from vSedes", Values.gDatos); cboPlaceAffectedDef.Source("Select cod3 from vSedes", Values.gDatos); cboPlaceAffectedDef.ComboBox.SelectedValueChanged += delegate { cboServiceDef.Source("Select codigoservicio from vServiciosSedes where cod3 = '" + cboPlaceAffectedDef.Value + "'", Values.gDatos); }; //cboService.Source("");// Select codigoservicio from vServiciosSedes where cod3 = '" + txtPlaceAffected.Text + "' cboMatterDef.Source("Select Codigo from materias", Values.gDatos); chkFlags.Source("Select codigo,DescFlagEng from flags where Tabla='CabTareas'"); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "vCabTareas"; CTLM.Start(); CTLM.AfterButtonClick += CTLM_AfterButtonClick; }
public fDeliveries() { InitializeComponent(); // Fill the routes combo cboRoute.ParentConn = Values.gDatos; cboRoute.Source($"select RouteCode from MasterRoutes where cod3='{Values.COD3}' order by RouteCode"); // Fill the carriers combo cboCarrier.ParentConn = Values.gDatos; cboCarrier.Source($"select Codigo,Descripcion from GENERAL..transportistas where CarrierId is not null order by Codigo", txtCarrierDescription); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pDeliveriesCabAdd"; CTLM.sSPUpp = "pDeliveriesCabUpp"; CTLM.sSPDel = "pDeliveriesCabDel"; CTLM.DBTable = "(Select * from DeliveriesCab where cod3='" + Values.COD3 + "') a"; //Header CTLM.AddItem(txtDelivery, "DeliveryCode", false, true, true, 0, true, true); CTLM.AddItem(txtPlate, "Plate", true, true, false, 0, false, true); CTLM.AddItem(cboRoute, "Route", true, true, false, 0, false, true); CTLM.AddItem(txtDate, "xfec", false, false, false, 1, false, true); CTLM.AddItem(txtClosedDate, "ClosedDate", false, false, false, 0, false, false); CTLM.AddItem(cboCarrier, "CarrierCode", true, true, false, 0, false, false); CTLM.AddItem(txtCarrierDescription, "CarrierDesc", false, false, false, 0, false, false); CTLM.AddItem(Values.COD3, "cod3", true, true, true, 0, false, true); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = ""; VS.sSPUpp = ""; VS.sSPDel = "pDeliveriesDetDel"; VS.DBTable = "vDeliveriesCabDet"; //VS Details VS.AddColumn("DeliveryCode", txtDelivery, pSPDel: "@DeliveryCode", pVisible: true); // Can't make it invisible as it raises an error in CTLM that I should fix //VS.AddColumn("DeliveryCode", txtDelivery, "@DeliveryCode", "", "@DeliveryCode", pVisible: false); VS.AddColumn("HU", "HU", pSPDel: "@HU"); VS.AddColumn("Type", "HUType", pSPDel: "@HU"); VS.AddColumn("Finis", "Finis"); VS.AddColumn("Qty", "Qty"); VS.AddColumn("Dealer", "Dealer"); VS.AddColumn("InContainer", "InContainer"); VS.AddColumn("cod3", "cod3", pSPDel: "@cod3", pVisible: false); //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); CTLM.AfterButtonClick += CTLM_AfterButtonClick;; Program.fDeliveries = this; }
public fSimpleReceivals() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "PAdd_Cab_Recepcion"; CTLM.sSPUpp = "PUpp_Cab_Recepcion"; CTLM.sSPDel = "PDel_Cab_Recepcion"; CTLM.DBTable = "(Select c.* from Cab_Recepcion c inner join Servicios s on s.codigo=c.servicio where s.cod3='" + Values.COD3 + "' and dbo.CheckFlag(s.flags,'SIMPLE')=1) a"; //Header CTLM.AddItem(txtEntrada, "Entrada", false, true, true, 1, true, true); CTLM.AddItem(txtFecha, "Fecha", true, true, false, 0, false, false); CTLM.AddItem(cboServicio, "Servicio", true, true, false, 0, false, true); CTLM.AddItem(txtSuppDoc, "Doc_Proveedor", true, true, false, 0, false, true); CTLM.AddItem(txtNotes, "Notas", true, true, false, 0, false, false); CTLM.AddItem(lstFlags, "flags", false, false, false, 0, false, true); //empty header values CTLM.AddItem("", "transportista", true, true, false, 0, false, false); CTLM.AddItem("", "matricula", true, true, false, 0, false, false); CTLM.AddItem("@@@", "conductor", true, true, false, 0, false, false); CTLM.AddItem("", "documento_aduana", true, true, false, 0, false, false); CTLM.AddItem("01/01/2001 00:00", "fecha_doc_proveedor", true, true, false, 0, false, false); //fields cboServicio.Source("Select Codigo,Nombre from Servicios where dbo.CheckFlag(flags,'SIMPLE')=1 and cod3='" + Values.COD3 + "' order by codigo", txtDesServicio); cboServicio.SelectedValueChanged += CboServicio_SelectedValueChanged; lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='Cab_Recepcion'"); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = "PAdd_Det_Recepcion"; VS.sSPUpp = ""; VS.sSPDel = "PDel_Det_Recepcion"; VS.DBTable = "Det_Recepcion"; //VS Details VS.AddColumn("Entrada", txtEntrada, "@entrada", "", "@entrada", pVisible: false); VS.AddColumn("Line", "linea", "", "", "@linea", pSortable: true); VS.AddColumn("PartNumber", "partnumber", "@partnumber", pSortable: true, pWidth: 90, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: string.Format("select partnumber from referencias where servicio='{0}'", cboServicio.Value)); VS.AddColumn("Description", "descripcion", "@descripcion", pSortable: true, pWidth: 200, pLocked: true); VS.AddColumn("Qty", "Qty", "@qty", pWidth: 90); VS.DataGridView.CellEndEdit += VS_CellEndEdit; //VS_CellValidating; ; ; //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); CTLM.AfterButtonClick += CTLM_AfterButtonClick; toolStrip.Enabled = false; }
public fReceivals() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pPackReceivalsCabAdd"; CTLM.sSPUpp = "pPackReceivalsCabUpp"; CTLM.sSPDel = "pPackReceivalsCabDel"; CTLM.DBTable = "vPackReceivalsCabCOD3"; //Header CTLM.AddItem(txtReceivalNumber, "RecNumber", false, true, true, 1, true, true); CTLM.AddItem(cboService, "Service", true, true, true, 1, true, true); CTLM.AddItem(txtDate, "Date", false, true, false, 0, false, false); CTLM.AddItem(txtSupplierDoc, "SupplierDoc", true, true, false, 0, false, false); CTLM.AddItem(txtUser, "UserProc", true, true, false, 0, false, false); CTLM.AddItem(txtNotes, "Notes", true, true, false, 0, false, false); CTLM.AddItem(lstFlags, "Flags", true, true, false, 0, false, true); CTLM.AddItem(txtDescService, "DescService"); CTLM.AddItem(Values.COD3, "cod3", pSearch: true); CTLM.ReQuery = true; //fields cboService.Source("Select ServiceCode,Description from MasterRepairServices where cod3='" + Values.COD3 + "' order by ServiceCode", txtDescService); cboService.SelectedValueChanged += CboService_SelectedValueChanged; lstFlags.Source("Select FlagCode,Caption from MasterFlags where TableName='PackReceivalsCab'"); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = "pPackReceivalsDetAdd"; VS.sSPDel = "pPackReceivalsDetDel"; VS.AllowInsert = true; VS.AllowUpdate = false; VS.AllowDelete = true; VS.DBTable = "vPackReceivalsDet"; //VS Columns VS.AddColumn("RecNumber", txtReceivalNumber, "@RecNumber", pSPDel: "@RecNumber", pVisible: false); VS.AddColumn("Service", cboService, "@Service", pSPDel: "@Service", pVisible: false); VS.AddColumn("UnitNumber", "UnitNumber", "@UnitNumber", pSPDel: "@UnitNumber"); VS.AddColumn("Reference", "Reference", "@Reference", pSortable: true, pWidth: 90, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: string.Format("select Reference from MasterRepairReferences where service='{0}'", cboService.Value)); VS.AddColumn("Description", "Description", pSortable: true, pWidth: 200); //VS.AddColumn("Flags", "Flags", ""); VS.CellEndEdit += VS_CellEndEdit; //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); //CTLM.AfterButtonClick += CTLM_AfterButtonClick; //CTLM.BeforeButtonClick += CTLM_BeforeButtonClick; //toolStrip.Enabled = false; }
public fProductionOrders() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "PAdd_Cab_Ordenes_Produccion"; CTLM.sSPUpp = "PUpp_Cab_Ordenes_Produccion"; CTLM.sSPDel = "PDel_Cab_Ordenes_Produccion"; CTLM.DBTable = "(Select c.* from Cab_Ordenes_Produccion c inner join Servicios s on s.codigo=c.servicio where s.cod3='" + Values.COD3 + "' and dbo.CheckFlag(s.flags,'SIMPLE')=1) a"; //Header CTLM.AddItem(txtNumero, "Numero", false, true, true, 1, true, true); CTLM.AddItem(cboServicio, "Servicio", true, true, false, 0, false, true); CTLM.AddItem(txtFecha, "Fecha", true, false, false, 0, false, false, DateTime.Now); CTLM.AddItem(cboRuta, "Ruta", true, true, false, 0, false, false); CTLM.AddItem(txtExpedicion, "Expedicion", pSearch: true); //empty header values CTLM.AddItem(Values.gDatos.User, "Usuario_Proceso", true, false, false, pDefValue: Values.gDatos.User, pSPAddParamName: "usuario"); CTLM.AddItem(DateTime.Now.ToString(), "Start_time", true, false, false, pDefValue: DateTime.Now.ToString(), pSPAddParamName: "start"); CTLM.AddItem(DateTime.Now.ToString(), "End_time", true, false, false, pDefValue: DateTime.Now.ToString(), pSPAddParamName: "end"); //fields cboServicio.Source("Select Codigo,Nombre from Servicios where dbo.CheckFlag(flags,'SIMPLE')=1 and cod3='" + Values.COD3 + "' order by codigo", txtDesServicio); cboServicio.SelectedValueChanged += CboServicio_SelectedValueChanged; //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = "PAdd_Det_Ordenes_Produccion"; VS.sSPUpp = "PUpp_Det_Ordenes_Produccion"; VS.sSPDel = "PDel_Det_Ordenes_Produccion"; VS.DBTable = "Det_Ordenes_Produccion"; //VS Details VS.AddColumn("Numero", txtNumero, "@numero", "@numero", "@numero", pVisible: false); VS.AddColumn("Linea", "Linea", "", "@linea", "@linea"); VS.AddColumn("PartNumber", "partnumber", "@partnumber", pSortable: true, pWidth: 90, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: string.Format("select partnumber from referencias where servicio='{0}'", cboServicio.Value)); VS.AddColumn("Descripcion", "descripcion", "@descripcion", pSortable: true, pWidth: 200); VS.AddColumn("Servicio", cboServicio, "@Servicio", pVisible: false); VS.AddColumn("Qty", "Qty", "@qty", "@qty", pWidth: 90); VS.AddColumn("Qty_ord", "Qty_Ord", "@Qty_ord", pVisible: false); VS.AddColumn("QTY_Embalajes", "QTY_Embalajes", "@QTY_Embalajes", "@QTY_Embalajes", pVisible: false); VS.AddColumn("PPM", "Qty_pzas_modulo", "@ppm", "@ppm", pVisible: false); VS.AddColumn("PPB", "Qty_pzas_pallet", "@ppb", "@ppb", pVisible: false); VS.AddColumn("BB2", "qty_pzas_block2", "@bb2", "@bb2", pVisible: false); VS.AddColumn("MOD", "mod", "@mod", "@mod", pVisible: false); VS.AddColumn("BLOCK", "block", "@block", "@block", pVisible: false); VS.AddColumn("BLOCK2", "block2", "@block2", "@block2", pVisible: false); //Various VS.CellEndEdit += VS_CellEndEdit; CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); }
//public EspackFileDataContainer FdcData { get; set; } = new EspackFileDataContainer(); public fDocumentControl() { InitializeComponent(); //try //{ //CTLM definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pDocumentsCabAdd"; CTLM.DBTable = "vDocumentControl"; //var txtFileName = (EspackTextBox)fsFileData; var FdcData = new EspackFileDataContainer(); //file containers fsFileData.FileData = FdcData; fsFileData.PDFFileData = FdcPDFData; //Header CTLM.AddItem(txtDocumentCode, "DocumentCode", CTLMControlTypes.NoAddPK); CTLM.AddItem(txtTypeCode, "TypeCode", CTLMControlTypes.AddSearch); CTLM.AddItem(txtSubtype, "SubTypeCode", CTLMControlTypes.AddSearch); CTLM.AddItem(txtSection, "SectionCode", CTLMControlTypes.AddSearch); CTLM.AddItem(txtTitle, "Title", CTLMControlTypes.AddSearch); CTLM.AddItem(fsFileData, "DocumentFileName", CTLMControlTypes.AddSearch); CTLM.AddItem(FdcData, "DATA", CTLMControlTypes.AddNoSearch); CTLM.AddItem(FdcPDFData, "PDFDATA", CTLMControlTypes.AddNoSearch); CTLM.AddItem(txtEdition, "Edition", CTLMControlTypes.Search); CTLM.AddItem(txtStatus, "Status", CTLMControlTypes.Search); CTLM.AddItem(lstFlags, "flags", CTLMControlTypes.AddSearch); //Fields lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='DocumentsCab'"); fsFileData.Click += BtnSearch_Click; VS.Conn = Values.gDatos; VS.SQL = "Select TypeCode,SectionCode,Title from DocumentsCab "; VS.Start(); //Resize += FDocumentControl_Resize; VS.UpdateEspackControl(); //CTLM.AddItem(VS); //start CTLM.ReQuery = true; CTLM.AddDefaultStatusStrip(); CTLM.Start(); //VS.AddFilterCell(EspackCellTypes.WILDCARDTEXT, 0, "Select distinct TypeCode from DocumentsCab order by TypeCode"); this.Load += FDocumentControl_Load; var c = VS.DataCellCollection; //AcroPDFLib.AcroPDF acroPDF = new AcroPDFLib.AcroPDFClass(); //} catch (Exception ex) //{ // CommonToolsWin.CTWin.MsgError(String.Format("Error 1: {0}\nError 2: {1}",ex.Message, ex.InnerException?.Message?? "")); //} }
// public fAlias() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "MAIL..pAddAliasCAB"; CTLM.sSPUpp = "MAIL..pUppAliasCAB"; CTLM.sSPDel = "MAIL..pDelAliasCAB"; CTLM.DBTable = "MAIL..aliasCAB"; //Header CTLM.AddItem(txtAddress, "Address", true, true, true, 1, true, true); CTLM.AddItem(txtLocalPart, "Local_Part"); CTLM.AddItem(txtDomain, "Domain"); CTLM.AddItem(lstFlags, "flags", true, true, false, 0, false, true); CTLM.AddItem(lstCOD3, "COD3", true, true, false, 0, false, true); lstFlags.Source("select codigo,descFlagEng from mail..flags where tabla='aliasCAB' order by DescFlagEng"); lstCOD3.Source("select n.COD3,g.Descripcion from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3"); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = "MAIL..pAddAliasDET"; VS.sSPUpp = ""; VS.sSPDel = "MAIL..pDelAliasDet"; VS.DBTable = "MAIL..aliasDET"; VS.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; //Details VS.AddColumn("Address", txtAddress, "@Address", "", "@Address", pVisible: false); VS.AddColumn("Destinations", "gotoAddress", "@gotoAddress", "", "@gotoAddress", false, false, false, pWidth: 200, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: "select email from mail..vEmailListAll order by email"); //VS Definitions VSExceptions.Conn = Values.gDatos; VSExceptions.sSPAdd = "MAIL..pAddAliasExceptionsDET"; VSExceptions.sSPUpp = ""; VSExceptions.sSPDel = "MAIL..pDelAliasExceptionsDet"; VSExceptions.DBTable = "MAIL..aliasExceptionsDET"; VSExceptions.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; //Details VSExceptions.AddColumn("Address", txtAddress, "@Address", "", "@Address", pVisible: false); VSExceptions.AddColumn("Exceptions", "gotoAddress", "@gotoAddress", "", "@gotoAddress", false, false, false, pWidth: 200, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: "select email from mail..vEmailListAll order by email"); //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.AddItem(VSExceptions); CTLM.Start(); }
public fSimpleReferences() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAdd_Referencias"; CTLM.sSPUpp = "pUpp_Referencias"; CTLM.sSPDel = "pDel_Referencias"; CTLM.DBTable = "(Select r.* from Referencias r inner join Servicios s on s.codigo=r.servicio where s.cod3='" + Values.COD3 + "' and dbo.CheckFlag(s.flags,'SIMPLE')=1) a"; //Header CTLM.AddItem(txtReference, "base", true, true, true, 1, true, true); CTLM.AddItem(cboServicio, "Servicio", true, true, true, 0, true, true); CTLM.AddItem(txtDescription, "descripcion", true, true, false, 0, false, true); CTLM.AddItem(txtFase4, "fase4", true, true, false, 0, false, false, 1); CTLM.AddItem(txtPrice, "precio", true, true, false, 0, false, false, 0); CTLM.AddItem(txtPeso, "peso", true, true, false, 0, false, false, 0); CTLM.AddItem(txtMin, "PU_Min", true, true, false, 0, false, false, 0); CTLM.AddItem(txtMax, "PU_Max", true, true, false, 0, false, false, 0); CTLM.AddItem(txtNotes, "Notas", true, true, false, 0, false, false, ""); CTLM.AddItem(lstFlags, "Flags", true, true, false, 0, false, true); CTLM.AddItem(txtSupplier, "proveedor", true, true, false, 0, false, true, pDefValue: "0"); //empty header values CTLM.AddItem("", "prefix", true, true, true, 0, true, pDefValue: ""); CTLM.AddItem("", "suffix", true, true, true, 0, true, pDefValue: ""); CTLM.AddItem("N", "aduana", true, true, false, pDefValue: "N"); CTLM.AddItem("CARD", "tipo", true, true, false, pDefValue: "CARD"); CTLM.AddItem("0", "MP_Min", true, true, false, pDefValue: "0"); CTLM.AddItem("0", "MP_Max", true, true, false, pDefValue: "0"); CTLM.AddItem("1", "qty_pzas_card", true, true, false, pDefValue: "1"); CTLM.AddItem("1", "qty_pzas_call", true, true, false, pDefValue: "1"); CTLM.AddItem("", "loc2", true, true, false, pDefValue: ""); CTLM.AddItem("", "muelle", true, true, false, pDefValue: ""); //CTLM.AddItem("0", "proveedor", true, true, false, pDefValue: "0"); CTLM.AddItem("0", "precio_trasvase", true, true, false, pDefValue: "0"); CTLM.AddItem("", "prefix_serv", true, true, false, pDefValue: ""); CTLM.AddItem("", "base_serv", true, true, false, pDefValue: ""); CTLM.AddItem("", "suffix_serv", true, true, false, pDefValue: ""); //fields cboServicio.Source("Select Codigo,Nombre from Servicios where dbo.CheckFlag(flags,'SIMPLE')=1 and cod3='" + Values.COD3 + "' order by codigo", txtDesServicio); lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='Referencias' and dbo.CheckFlag(flags,'SIMPLE')=1"); //Various CTLM.AddDefaultStatusStrip(); CTLM.Start(); }
public fSystemsMaster() { InitializeComponent(); //async button if (IsGeneratingXML) { btnXMLFile.Image = global::Sistemas.Properties.Resources.rolling; } //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pMasterSystemsAdd"; CTLM.sSPUpp = "pMasterSystemsUpp"; CTLM.sSPDel = "pMasterSystemsDel"; CTLM.DBTable = "MasterSystems"; //Header CTLM.AddItem(txtSystemCode, "SystemCode", true, true, true, 1, true, true); CTLM.AddItem(txtDescription, "Description", true, true, false, 0, false); CTLM.AddItem(cboDatabase, "DB", true, true, false, 0, false, true); CTLM.AddItem(txtApp, "App", true, true, false, 0, false, true); CTLM.AddItem(txtVersion, "Version", true, true, false, 0, false, true); CTLM.AddItem(lstLocations, "Locations", true, true, false, 0, false, true); CTLM.AddItem(lstUserPositions, "UserPositions", true, true, false, 0, false, true); CTLM.AddItem(lstAreas, "Areas", true, true, false, 0, false, true); CTLM.AddItem(lstRequiredUserFlags, "RequiredUserFlags", true, true, false, 0, false, true); CTLM.AddItem(lstFlags, "flags", true, true, false, 0, false, true); cboDatabase.Source("Select name from sys.databases order by name"); lstLocations.Source("Select cod3,nombre from vSedes order by nombre"); lstUserPositions.Source("Select PositionCode, Convert(varchar,MinSecurityLevel)+'-'+PositionDescription from MasterUserPositions order by MinSecurityLevel"); lstAreas.Source("Select idArea,Description from MasterAreas order by idArea"); lstRequiredUserFlags.Source("select codigo,descFlagEng from flags where tabla='Users' order by DescFlagEng"); lstFlags.Source("select codigo,descFlagEng from flags where tabla='MasterSystems' order by DescFlagEng"); CTLM.AddDefaultStatusStrip(); CTLM.Start(); CTLM.AfterButtonClick += CTLM_AfterButtonClick; CTLM.BeforeButtonClick += CTLM_BeforeButtonClick; // servers list serversList1.User = Values.DefaultUserForServers; serversList1.Password = Values.DefaultPasswordForServers; serversList1.Start("APPServer", "~/checkout.sh", btnServerCheckout); }
public fCustomers() { InitializeComponent(); //CTLM definitions CTLM.Conn = gDatos; CTLM.sSPAdd = "pMasterCustomersAdd"; CTLM.sSPUpp = "pMasterCustomersUpp"; CTLM.sSPDel = "pMasterCustomersDel"; CTLM.AddItem(txtCode, "CustomerCode", CTLMControlTypes.NoAddPK); CTLM.AddItem(txtName, "Name", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtAddress, "Address", CTLMControlTypes.AddUppNoSearch); CTLM.AddItem(txtPostalCode, "PostalCode", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtTown, "Town", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtCountyProv, "CountyProv", CTLMControlTypes.AddUppSearch); CTLM.AddItem(cboCountryCode, "CountryCode", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtVATNumber, "VATNumber", CTLMControlTypes.AddUppSearch); CTLM.AddItem(cboPaymentCode, "PaymentCode", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtDueDays, "DueDays", CTLMControlTypes.AddUppNoSearch); CTLM.AddItem(cboSupplierCode, "SupplierCode", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtVAT, "VAT", CTLMControlTypes.AddUppNoSearch); CTLM.AddItem(cboCurrency, "Currency", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtIBAN, "IBAN", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtShipHolder, "ShipHolder", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtShipAddress, "ShipAddress", CTLMControlTypes.AddUppNoSearch); CTLM.AddItem(txtShipPostalCode, "ShipPostalCode", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtShipTown, "ShipTown", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtShipCountyProv, "ShipCountyProv", CTLMControlTypes.AddUppSearch); CTLM.AddItem(cboShipCountryCode, "ShipCountryCode", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtShipVATNumber, "ShipVATNumber", CTLMControlTypes.AddUppSearch); CTLM.AddItem(lstFlags, "Flags", CTLMControlTypes.AddUppNoSearch); //CTLM.AddItem("", "ExtraData", CTLMControlTypes.AddUppNoSearch); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "MasterCustomers"; CTLM.ReQuery = true; lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='MasterCustomers'"); cboCountryCode.Source("select Codigo_Alfa3,Pais_EN from general..paises where codigo_alfa3 is not null order by Pais_EN", txtCountryCodeDescription); cboShipCountryCode.Source("select Codigo_Alfa3,Pais_EN from general..paises where codigo_alfa3 is not null order by Pais_EN", txtShipCountryCodeDescription); cboSupplierCode.Source("select SupplierCode,Description from MasterSuppliers order by SupplierCode", txtSupplierCodeDescription); cboPaymentCode.Source("select PaymentCode,Description from MasterPaymentCodes order by PaymentCode", txtPaymentCodeDescription); cboCurrency.Source("select Currency,CurrencyName from MasterCurrencyCodes order by Currency", txtCurrencyDescription); CTLM.Start(); }
public fHUs() { InitializeComponent(); // Fill the routes and HU types combo cboRoute.ParentConn = Values.gDatos; cboRoute.Source($"select RouteCode='' union all Select RouteCode from MasterRoutes where cod3='{Values.COD3}' order by RouteCode"); cboHUType.ParentConn = Values.gDatos; cboHUType.Source($"select distinct DealisPackCode,descripcion from SELECCION..bultoscm where dealispackcode is not null and len(codigo)<7 order by DealisPackCode", txtHUTypeDescription); cboHUType.Validated += CboHUType_Validated; //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pHUCabAdd"; CTLM.sSPUpp = ""; CTLM.sSPDel = "pHUCabDel"; CTLM.DBTable = "(Select *,Type=HUType from HUCab where cod3='" + Values.COD3 + "') a"; //Header CTLM.AddItem(txtHU, "HU", false, false, true, 1, true, true); CTLM.AddItem(Values.COD3, "cod3", true, false, true, 0, false, true); CTLM.AddItem(txtDate, "Date", false, false, false, 0, false, false); CTLM.AddItem(txtDealer, "Dealer", true, false, false, 0, false, true); CTLM.AddItem(cboRoute, "Route", true, false, false, 0, false, true); CTLM.AddItem(cboHUType, "Type", true, false, false, 0, false, false); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = ""; VS.sSPUpp = ""; VS.sSPDel = "pHUDetDel"; VS.DBTable = "HUDet"; //VS Details VS.AddColumn("HU", txtHU, pVisible: false); VS.AddColumn("cod3", "cod3", pVisible: false); VS.AddColumn("FINIS", "Finis"); VS.AddColumn("QTY", "qty"); //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); }
public fReceivals() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = ""; CTLM.sSPUpp = ""; CTLM.sSPDel = ""; CTLM.DBTable = "(Select * from ReceivalsCab where cod3='" + Values.COD3 + "') a"; //Header CTLM.AddItem(txtReceival, "ReceivalCode", false, false, false, 1, false, true); CTLM.AddItem(txtDate, "Date", false, false, false, 1, false, false); CTLM.AddItem(Values.COD3, "cod3", false, false, false, 1, false, true); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = ""; VS.sSPUpp = ""; VS.sSPDel = ""; VS.DBTable = "ReceivalsDet"; //VS Details VS.AddColumn("ReceivalCode", txtReceival, pVisible: false); VS.AddColumn("cod3", "cod3", pVisible: false); VS.AddColumn("Line", "Line"); VS.AddColumn("Dealer", "Dealer"); VS.AddColumn("Description", "DealerDesc"); VS.AddColumn("OrderNumber", "OrderNumber"); VS.AddColumn("OrderItemNumber", "OrderItemNumber"); VS.AddColumn("Finis", "Finis"); VS.AddColumn("Qty", "Qty"); VS.AddColumn("QtyPending", "QtyPending"); VS.AddColumn("Route", "Route"); VS.AddColumn("TrafficArea", "TrafficArea"); //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); }
public fContainers() { InitializeComponent(); // Fill the routes combo cboRoute.ParentConn = Values.gDatos; cboRoute.Source($"select RouteCode='' union all Select RouteCode from MasterRoutes where cod3='{Values.COD3}' order by RouteCode"); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pContainersCabAdd"; CTLM.sSPUpp = "pContainersCabUpp"; CTLM.sSPDel = "pContainersCabDel"; CTLM.DBTable = "(Select * from ContainersCab where cod3='" + Values.COD3 + "') a"; //Header CTLM.AddItem(txtContainer, "ContainerCode", false, false, true, 1, true, true); CTLM.AddItem(Values.COD3, "cod3", false, false, true, 0, false, true); CTLM.AddItem(cboRoute, "Route", false, false, false, 0, false, true); CTLM.AddItem(txtInDelivery, "InDelivery", false, false, false, 0, false, false); CTLM.AddItem(txtInDeliveryDate, "InDeliveryDate", false, false, false, 0, false, false); CTLM.AddItem(txtDate, "Date", false, false, false, 0, false, false); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = "pContainersDetAdd"; VS.sSPUpp = ""; VS.sSPDel = "pContainersDetDel"; VS.DBTable = "ContainersDet"; //VS Details VS.AddColumn("ContainerCode", txtContainer, pVisible: false); VS.AddColumn("HU", "HU"); VS.AddColumn("cod3", "cod3", pVisible: false); //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); }
public fCurrencies() { InitializeComponent(); //CTLM definitions CTLM.Conn = gDatos; CTLM.sSPAdd = "pMasterCurrenciesAdd"; CTLM.sSPUpp = "pMasterCurrenciesUpp"; CTLM.sSPDel = "pMasterCurrenciesDel"; CTLM.AddItem(txtCurrency, "Currency", CTLMControlTypes.PK); CTLM.AddItem(txtName, "CurrencyName", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtExchangeRate, "ExchangeRate", CTLMControlTypes.AddUppNoSearch); CTLM.AddItem(txtSymbol, "Symbol", CTLMControlTypes.AddUppSearch); CTLM.AddItem(txtUpdateDate, "UpdateDate"); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "MasterCurrencies"; CTLM.ReQuery = true; CTLM.Start(); }
public fProfiles() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddProfilesCab"; CTLM.sSPUpp = "pUppProfilesCab"; CTLM.sSPDel = "pDelProfilesCab"; CTLM.DBTable = "ProfilesCab"; //Header CTLM.AddItem(txtProfileCode, "ProfileCode", true, true, true, 1, true, true); CTLM.AddItem(txtDescription, "Description", true, true, false, 0, false, true); CTLM.AddItem(lstCOD3, "COD3", true, true, false, 0, false, true); CTLM.AddItem(lstFlags, "flags", true, true, false, 0, false, true); lstFlags.Source("select codigo,descFlagEng from flags where tabla='ProfilesCab' order by DescFlagEng"); lstCOD3.Source("select n.COD3,g.Descripcion from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3"); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = "pAddProfilesDet"; VS.sSPUpp = "pUppProfilesDet"; VS.sSPDel = "pDelProfilesDet"; VS.DBTable = "ProfilesDet"; //Details //VS.AddColumn("ProfileCode", txtProfileCode, "@ProfileCode", "@ProfileCode", "@ProfileCode"); //VS.AddColumn("Service","Service","@Service", "@Service", "@Service",aMode: AutoCompleteMode.Append,aSource: AutoCompleteSource.CustomSource,aQuery: "Select ServiceCode from Services order by ServiceCode"); //VS.AddColumn("Default Flags", "DefaultFlags", "@DefaultFlags", "@DefaultFlags", ""); //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); }
public Form1() { InitializeComponent(); CTLM.Conn = new cAccesoDatosNet("DB01", "SISTEMAS", "sa", "5380"); txtUserCode.AutoCompleteMode = AutoCompleteMode.Suggest; txtUserCode.AutoCompleteSource = AutoCompleteSource.CustomSource; //txtUserCode.TextBox.Multiline = false; var autoCompleteCustomSource = new AutoCompleteStringCollection(); txtText.AutoCompleteMode = AutoCompleteMode.SuggestAppend; txtText.AutoCompleteSource = AutoCompleteSource.CustomSource; using (DynamicRS rs = new DynamicRS("Select UserCode from Users", CTLM.Conn)) { rs.Open(); rs.ToList().ForEach(r => autoCompleteCustomSource.Add(r[0].ToString())); } txtUserCode.AutoCompleteCustomSource = autoCompleteCustomSource; txtText.AutoCompleteCustomSource = autoCompleteCustomSource; CTLM.DBTable = "vUsers"; CTLM.AddItem(txtUserCode, "UserCode", CTLMControlTypes.Search); CTLM.AddItem(txtUserNumber, "UserNumber", CTLMControlTypes.Search); CTLM.AddItem(txtPwdExp, "PasswordEXP", CTLMControlTypes.NoSearch); CTLM.AddItem(cboMainCOD3, "MainCOD3", CTLMControlTypes.Search); CTLM.AddItem(lstCOD3, "COD3", CTLMControlTypes.Search); CTLM.AddItem(txtDesCod3, "desCOD3", CTLMControlTypes.NoSearch); lstCOD3.Source("select n.COD3,Descripcion=n.cod3 from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3"); cboMainCOD3.Source("select n.COD3,g.Descripcion from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3", txtDesCod3); CTLM.Start(); VS.Conn = CTLM.Conn; VS.SQL = "Select UserCode, Area, COD3 from Users where usercode!='' order by UserCode"; VS.Start(); VS.UpdateEspackControl(); //VS.FilterRowEnabled = true; }
//private string _prevStatus; public fFlags() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddFlags"; CTLM.sSPUpp = ""; CTLM.sSPDel = "pDelFlags"; CTLM.AddItem(txtIdReg, "IdReg", false, false, false, 1, true, true); CTLM.AddItem(cboTable, "Tabla", true, false, true, 1, false, true); CTLM.AddItem(txtLetter, "Letra", true, false, false, 1, false, true); CTLM.AddItem(txtCode, "Codigo", true, false, true, 1, false, true); CTLM.AddItem(txtDescFlag, "DescFlag", true, false, false, 0, false, true); CTLM.AddItem(txtDesFlagEng, "DescFlagEng", true, false, false, 0, false, true); CTLM.AddItem(lstServices, "Servicio", true, false, false, 0, false, true); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "flags"; lstServices.Source("select ServiceCode,ServiceCode as 'DESC' from services order by servicecode, Description"); cboTable.Source("select name from sistemas.sys.tables where is_ms_shipped=0 order by name"); CTLM.Start(); }
public fSimpleDeliveriesEPC() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pSimpleDeliveriesCabAdd"; CTLM.sSPUpp = "pSimpleDeliveriesCabUpp"; CTLM.sSPDel = "pSimpleDeliveriesCabDel"; CTLM.DBTable = "(Select v.* from vSimpleDeliveriesCab v inner join Servicios s on s.codigo=v.service where s.cod3='" + Values.COD3 + "' and dbo.CheckFlag(s.flags,'SIMPLE')=1) a"; //Header CTLM.AddItem(ExtraData, "ExtraData", true, true, false, 0, false, false); CTLM.AddItem(txtDeliveryN, "DeliveryNumber", false, true, true, 1, true, true); CTLM.AddItem(cboService, "Service", true, true, true, 0, false, true); CTLM.AddItem(txtTruckPlate, "TruckPlate", true, true, false, 0, false, true); CTLM.AddItem(txtTrailerPlate, "TrailerPlate", true, true, false, 0, false, true); CTLM.AddItem(cboDock, "Dock", true, true, false, 0, false, true); CTLM.AddItem(cboShift, "Shift", true, true, false, 0, false, true); CTLM.AddItem(txtResponsible, "UserProc", true, true, false, 0, false, true); CTLM.AddItem(dateParking, "ParkingDate", true, true, false, 0, false, true, pExtraDataLink: ExtraData); CTLM.AddItem(dateGate2, "Gate2Date", true, true, false, 0, false, true, pExtraDataLink: ExtraData); CTLM.AddItem(dateDriverShiftLeader, "Driver2ShiftLeaderDate", true, true, false, 0, false, true, pExtraDataLink: ExtraData); CTLM.AddItem(dateStart, "StartDate", false, false, false, 0, false, false); CTLM.AddItem(dateEnd, "EndDate", false, false, false, 0, false, false); CTLM.AddItem(lstFlags, "flags", false, false, false, 0, false, false); dateDriverShiftLeader.Protected = true; //fields cboService.Source("Select Codigo from Servicios where dbo.CheckFlag(flags,'SIMPLE')=1 and cod3='" + Values.COD3 + "' order by codigo"); cboService.SelectedValueChanged += CboService_SelectedValueChanged; cboDock.Source("Select DockCode from SedesDocks where cod3='" + Values.COD3 + "' order by DockCode"); lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='SimpleDeliveriesCab'"); //VS Definitions> VS.Conn = Values.gDatos; VS.sSPAdd = "pSimpleDeliveriesDetAdd"; VS.sSPUpp = "pSimpleDeliveriesDetUpp"; VS.sSPDel = "pSimpleDeliveriesDetDel"; VS.DBTable = "vSimpleDeliveriesDet"; //VS Details VS.AddColumn("DeliveryNumber", txtDeliveryN, "@DeliveryNumber", "@DeliveryNumber", "@DeliveryNumber", pVisible: false); VS.AddColumn("Service", cboService, "@Service", "@Service", "@Service", pVisible: false); VS.AddColumn("Line", "Line", "", "@Line", "@Line", pSortable: true, pLocked: true, pPK: true); VS.AddColumn("PartNumber", "partnumber", "@partnumber", pSortable: true, pWidth: 100, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: string.Format("select partnumber from referencias where servicio='{0}' order by partnumber", cboService.Value)); VS.AddColumn("Description", "Description", pWidth: 160); VS.AddColumn("Destination", "Destination", "@Destination", "@Destination", pWidth: 200, pQuery: string.Format("select Destination=planta+' ('+Descripcion2+') '+Descripcion1 from servicios_destinos where servicio='{0}'", cboService.Value), pSortable: true); //, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: string.Format("select partnumber from servicio_destinos where servicio='{0}'", cboService.Value)); VS.AddColumn("OrderedQty", "OrderedQty", "@OrderedQty", "@OrderedQty", pWidth: 90); VS.AddColumn("SentQty", "SentQty", "@SentQty", "@SentQty", pWidth: 90); VS.CellBeginEdit += VS_CellBeginEdit; VS.CellEndEdit += VS_CellEndEdit; //VS_CellValidating; ; ; VS.DataError += VS_DataError; //Various CTLM.ReQuery = true; CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); CTLM.AfterButtonClick += CTLM_AfterButtonClick; toolStrip.Enabled = false; }
public fHSAReceivals() { InitializeComponent(); //CTLM Definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "PAddHSAReceivalsCab"; CTLM.sSPUpp = "PUppHSAReceivalsCab"; CTLM.sSPDel = "PDelHSAReceivalsCab"; CTLM.DBTable = "vHSAReceivalsCabCOD3"; //CTLM.DBTable = "(Select H.*,DescService=S.Nombre from HSAReceivalsCab H inner join Servicios S on S.codigo=H.service where s.cod3='" + Values.COD3 + "' and dbo.CheckFlag(s.flags,'HSA')=1) a"; //Header CTLM.AddItem(cboService, "service", true, true, false, 0, false, true); CTLM.AddItem(txtReceivalCode, "recCode", false, true, true, 1, true, true); CTLM.AddItem(txtContainer, "container", true, true, false, 0, false, true); CTLM.AddItem(txtPackingSlip, "packingSlip", true, true, false, 0, false, true); CTLM.AddItem(txtDate, "date", true, true, false, 1, false, false); CTLM.AddItem(txtArrivalDate, "ArrivalDate", false, false, false, 0, false, false); CTLM.AddItem(lstFlags, "flags", true, true, false, 0, false, true); CTLM.AddItem(txtPortDepartureDate, "PortDepartureDate", false, false, false, 0, false, false); CTLM.AddItem(txtDescService, "DescService"); CTLM.AddItem(Values.COD3, "cod3", pSearch: true, pDefValue: Values.COD3); CTLM.ReQuery = true; //fields cboService.Source("Select Codigo,Nombre from Servicios where dbo.CheckFlag(flags,'HSA')=1 and cod3='" + Values.COD3 + "' order by codigo", txtDescService); cboService.SelectedValueChanged += CboService_SelectedValueChanged; lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='HSAReceivalsCab'"); //VS Definitions VS.Conn = Values.gDatos; VS.sSPAdd = "PAddHSAReceivalsDet"; VS.AllowInsert = false; VS.AllowUpdate = false; VS.AllowDelete = false; //VS.sSPUpp = "UppHSAReceivalsDet"; //VS.sSPDel = ""; VS.DBTable = "vHSAReceivalsDet"; //VS Details VS.AddColumn("RecCode", txtReceivalCode, "@RecCode"); VS.AddColumn("Line", "line"); VS.AddColumn("Partnumber", "partnumber", "@partnumber", pSortable: true, pWidth: 90, aMode: AutoCompleteMode.SuggestAppend, aSource: AutoCompleteSource.CustomSource, aQuery: string.Format("select partnumber from referencias where servicio='{0}'", cboService.Value)); VS.AddColumn("Description", "description", pSortable: true, pWidth: 200); VS.AddColumn("Qty", "Qty", "@qty", pWidth: 90); VS.AddColumn("SupplierDoc", "SupplierDoc", "@supplierDoc"); //VS.AddColumn("Flags", "Flags", ""); VS.CellEndEdit += VS_CellEndEdit; //VS_CellValidating; ; ; //Various CTLM.AddDefaultStatusStrip(); CTLM.AddItem(VS); CTLM.Start(); CTLM.AfterButtonClick += CTLM_AfterButtonClick; CTLM.BeforeButtonClick += CTLM_BeforeButtonClick; //toolStrip.Enabled = false; setROBOT_Status(EnumROBOT_Status.NONE); }
public fUsers() { InitializeComponent(); //CTLM definitions //Who CTLM.Conn = gDatos; CTLM.sSPAdd = "pAddUsers"; CTLM.sSPUpp = "pUppUsers"; CTLM.sSPDel = ""; CTLM.AddItem(txtUserCode, "UserCode", true, true, false, 1, true, true); CTLM.AddItem(txtName, "Name", true, true, false, 0, false, true); CTLM.AddItem(txtSurname1, "Surname1", true, true, false, 0, false, true); CTLM.AddItem(txtSurname2, "Surname2", true, true, false, 0, false, true); CTLM.AddItem(txtUserNumber, "UserNumber", false, true, false, 0, false, true); //Where CTLM.AddItem(cboCOD3, "MainCOD3", true, true, false, 1, false, true); CTLM.AddItem(txtDesCod3, "desCOD3", CTLMControlTypes.NoSearch); CTLM.AddItem(listCOD3, "COD3", true, true, false, 1, false, true); CTLM.AddItem(cboPosition, "Position", true, true, false, 1, false, true); CTLM.AddItem(cboPositionLevel, "PositionLevel", false, true, false, 0, false, true); CTLM.AddItem(cboSecurityLevel, "SecurityLevel", true, true, false, 0, false, true); CTLM.AddItem(cboArea, "area", true, true, false, 0, false, true); //Systems CTLM.AddItem(txtPWD, "Password", false, true, false, 0, false, false); CTLM.AddItem(txtPasswordEXP, "PasswordEXP", false, true, false, 0, false, false); CTLM.AddItem(txtPIN, "PIN", false, true, false, 0, false, false); CTLM.AddItem(cboDomain, "domain", true, false, false, 0, false, true); CTLM.AddItem(txtEmail, "emailAddress", false, false, false, 0, false, true); CTLM.AddItem(txtQuota, "EmailQuota", false, true, false, 0, false, false); CTLM.AddItem(lstFlags, "Flags", true, true, false, 0, false, true); CTLM.AddItem(txtTicket, "Ticket", CTLMControlTypes.NoSearch); CTLM.AddItem(txtTicketExp, "TicketExp", CTLMControlTypes.NoSearch); CTLM.AddItem(lstEmailAliases, "Aliases", true, true, false, 0, false, false, pSPAddParamName: "alias", pSPUppParamName: "alias"); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = string.Format("(Select * from vUsers where isnull(PositionLevel,50)>={0}) B", SecurityLevel); CTLM.ReQuery = true; cboCOD3.Source("select n.COD3,g.Descripcion from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3", txtDesCod3); listCOD3.Source("select n.COD3,g.Descripcion from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3"); listCOD3.ValueChanged += ListCOD3_Changed; cboDomain.Source("Select domain from domain where domain<>'ALL' order by domain"); cboPosition.Source(string.Format("select PositionCode,PositionDescription from MasterUserPositions where MinSecurityLevel>={0} order by MinSecurityLevel", SecurityLevel), txtPosition); cboPositionLevel.Source(string.Format("select SecurityLevel from MasterSecurityLevels where SecurityLevel>={0} order by SecurityLevel", SecurityLevel)); cboSecurityLevel.Source(string.Format("select SecurityLevel from MasterSecurityLevels where SecurityLevel>={0} order by SecurityLevel", SecurityLevel)); cboArea.Source(string.Format("select idArea from MasterAreas order by idArea", SecurityLevel)); lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='Users'"); CTLM.AfterButtonClick += CTLM_AfterButtonClick; CTLM.Start(); _prevStatus = listCOD3.Text; cboCOD3.ComboBox.SelectedValueChanged += delegate { if (cboCOD3.SelectedValue != null && (CTLM.Status == EnumStatus.EDIT || CTLM.Status == EnumStatus.ADDNEW)) { listCOD3.CheckItem(cboCOD3.Text); } }; listCOD3.CheckedListBox.ItemCheck += delegate(object sender, ItemCheckEventArgs e) { if ((e.NewValue == CheckState.Unchecked) && (listCOD3.keyItem(e.Index) == cboCOD3.Text) && (CTLM.Status == EnumStatus.EDIT || CTLM.Status == EnumStatus.ADDNEW)) { MessageBox.Show("Cannot remove Main COD3 from COD3 list", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); e.NewValue = CheckState.Checked; return; } if (CTLM.Status == EnumStatus.EDIT) { lstEmailAliases.UpdateEspackControl(); } }; txtSurname1.Validating += TxtSurname1_Validating; //this.FormClosed += FUsers_FormClosed; }
public fItems() { InitializeComponent(); //CTLM definitions CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddItemsCab"; CTLM.sSPUpp = "pUppItemsCab"; CTLM.sSPDel = "pDelItemsCab"; CTLM.AddItem(txtCode, "Code", true, true, true, 1, true, true); CTLM.AddItem(txtName, "Name", true, true, false, 0, false, true); CTLM.AddItem(txtDescription, "Description", true, true, false, 0, false, true); CTLM.AddItem(cboCOD3, "MainCOD3", true, true, false, 1, false, true); CTLM.AddItem(txtDesCod3, "DesCOD3", CTLMControlTypes.NoSearch); CTLM.AddItem(listCOD3, "COD3", true, true, false, 1, false, true); CTLM.AddItem(cboType, "Type", true, true, false, 0, false, true); CTLM.AddItem(txtDesType, "DesType", CTLMControlTypes.NoSearch); CTLM.AddItem(cboZone, "Zone", true, true, false, 1, false, true); CTLM.AddItem(txtSerial, "Serial", true, true, false, 0, false, true); CTLM.AddItem(txtInvoice, "Invoice", true, true, false, 0, false, true); CTLM.AddItem(txtInvoiceDate, "InvoiceDate", true, true, false, 0, false, false); CTLM.AddItem(txtCM, "CM", true, false, false, 0, false, true); CTLM.AddItem(lstFlags, "Flags", true, true, false, 0, false, false); CTLM.AddItem(lstSectionFlags, "TypeFlags", CTLMControlTypes.AddUppNoSearch); CTLM.AfterButtonClick += CTLM_AfterButtonClick; CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "vItemsCab"; cboCOD3.Source("select n.COD3,g.Descripcion from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3", txtDesCod3); listCOD3.Source("select n.COD3,g.Descripcion from NetworkSedes n inner join general..sedes g on g.cod3=n.COD3 order by n.Cod3"); cboType.Source("Select Code,Description from ItemTypes order by Code", txtDesType); cboZone.Source("Select Code from Zones order by Code"); lstFlags.Source("Select codigo,DescFlagEng from flags where Tabla='ItemsCab'"); VS.Conn = Values.gDatos; VS.AddColumn("Code", txtCode, "@Code", "@Code", "@Code"); VS.AddColumn("Line", "Line", "@Line", "@Line", "@Line", true, false, true, pWidth: 100); VS.AddColumn("Type", "Type", "@Type", "", "", true, false, false, "Select Code from ItemTypes order by Code", pWidth: 200); VS.AddColumn("Description", "Description", "@Description", "@Description", pWidth: 100); VS.AddColumn("Value1", "Value1", "@Value1", "@Value1", "", pWidth: 100); VS.AddColumn("Value2", "Value2", "@Value2", "@Value2", "", pAutoSizeMode: DataGridViewAutoSizeColumnMode.Fill); //VS.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; VS.DBTable = "ItemsDet"; VS.sSPAdd = "pAddItemsDet"; VS.sSPUpp = "pUppItemsDet"; VS.sSPDel = "pDelItemsDet"; CTLM.AddItem(VS); CTLM.Start(); _prevStatus = listCOD3.Text; cboCOD3.ComboBox.SelectedValueChanged += delegate { if (cboCOD3.SelectedValue != null) { listCOD3.CheckItem(cboCOD3.Text); } }; listCOD3.CheckedListBox.ItemCheck += delegate(object sender, ItemCheckEventArgs e) { if ((e.NewValue == CheckState.Unchecked) && (listCOD3.keyItem(e.Index) == cboCOD3.Text) && (CTLM.Status == EnumStatus.EDIT || CTLM.Status == EnumStatus.ADDNEW)) { MessageBox.Show("Cannot remove Main COD3 from COD3 list", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error); e.NewValue = CheckState.Checked; } }; cboType.ComboBox.SelectedValueChanged += ComboBox_SelectedValueChanged; //cboCOD3.SelectedValue = ""; //CTLM.AfterButtonClick += delegate (object source, CTLMEventArgs e) //{ // if (e.ButtonClick == "btnCancel") // { // txtCOD3Name.Text = ""; // } //}; //KeyDown += delegate(object sender, KeyEventArgs e) // { // MessageBox.Show("Patata"); // }; }
public fZones() { InitializeComponent(); CTLM.Conn = Values.gDatos; CTLM.sSPAdd = "pAddZones"; CTLM.sSPUpp = "pUppZones"; CTLM.sSPDel = "pDelZones"; CTLM.AddItem(txtCode, "Code", true, true, true, 0, true, true); CTLM.AddItem(txtSubNet, "SubNet", true, true, false, 1, false, true); CTLM.AddItem(txtMask, "Mask", true, true, false, 0, false, true); CTLM.AddDefaultStatusStrip(); CTLM.DBTable = "Zones"; CTLM.Start(); enabler(true); _changes = true; txtSubNet.TextChanged += delegate { if (_changes) { _changes = false; var _subnet = txtSubNet.Text.Split('.'); txtSubnet1.Text = _subnet.Count() > 0 ? _subnet[0] : ""; txtSubnet2.Text = _subnet.Count() > 1 ? _subnet[1] : ""; txtSubnet3.Text = _subnet.Count() > 2 ? _subnet[2] : ""; txtSubnet4.Text = _subnet.Count() > 3 ? _subnet[3] : ""; _changes = true; } }; txtMask.TextChanged += delegate { if (_changes) { _changes = false; var _mask = txtMask.Text.Split('.'); txtMask1.Text = _mask[0]; txtMask2.Text = _mask.Count() > 1 ? _mask[1] : ""; txtMask3.Text = _mask.Count() > 2 ? _mask[2] : ""; txtMask4.Text = _mask.Count() > 3 ? _mask[3] : ""; _changes = true; } }; CTLM.AfterButtonClick += delegate(object source, CTLMEventArgs e) { switch (e.ButtonClick) { case "btnCancel": case "btnSearch": case "btnAdd": case "btnUpp": enabler(true); break; default: enabler(false); break; } }; txtMask1.TextChanged += ipChecker; txtMask2.TextChanged += ipChecker; txtMask3.TextChanged += ipChecker; txtMask4.TextChanged += ipChecker; txtSubnet1.TextChanged += ipChecker; txtSubnet2.TextChanged += ipChecker; txtSubnet3.TextChanged += ipChecker; txtSubnet4.TextChanged += ipChecker; }