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 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 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 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 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 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 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 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); }