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(); }
private void ipChecker(object sender, EventArgs e) { if (_changes) { _changes = false; var text = (MaskedTextBox)sender; try { Convert.ToByte(text.Text); } catch { CTLM.StatusMsg("Wrong IP block data."); text.Text = ""; } txtSubNet.Text = txtSubnet1.Text + "." + txtSubnet2.Text + "." + txtSubnet3.Text + "." + txtSubnet4.Text; if (txtSubNet.Text == "...") { txtSubNet.Text = ""; } txtMask.Text = txtMask1.Text + "." + txtMask2.Text + "." + txtMask3.Text + "." + txtMask4.Text; if (txtMask.Text == "...") { txtMask.Text = ""; } if (text.Text.Length == 3) { SendKeys.Send("{TAB}"); } _changes = true; } }
private void btnACheck_Click(object sender, EventArgs e) { if (MessageBox.Show("This will check and if possible store all the received parts. Are you sure?", "SIMPLISTICA", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { using (var _sp = new SP(Values.gDatos, "pProcessSimpleReceival")) { _sp.AddParameterValue("@Recepcion", txtEntrada.Value.ToString()); try { _sp.Execute(); } catch (Exception ex) { CTWin.MsgError(ex.Message); return; } if (_sp.LastMsg.Substring(0, 2) != "OK") { CTWin.MsgError(_sp.LastMsg); return; } //lstFlags["RECEIVED"] = true; } CTLM.StatusMsg("Process completed."); } }
private void generateCM(int pReceival, int pLine) { //sp preparation using (var _sp = new SP(Values.gDatos, "PGenerar_Paletags_linea")) { using (var _rs = new DynamicRS(string.Format("Select 0 from CMS_PALETAGS where Entrada='{0}' and Linea='{1}'", pReceival, pLine), Values.gDatos)) { _rs.Open(); //if no paletags for the line if (_rs.RecordCount == 0) { CTLM.StatusMsg(string.Format("Generating paletags for line {0}", pLine)); _sp.AddParameterValue("@Entrada", pReceival); _sp.AddParameterValue("@Linea", pLine); try { //generate them _sp.Execute(); } catch (Exception ex) { throw new Exception(ex.Message); } if (_sp.LastMsg.Substring(0, 2) != "OK") { throw new Exception(_sp.LastMsg); } } //now we print them } } }
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; }
private void btnReloadVersions_Click(object sender, EventArgs e) { CTLM.ClearValues(); txtNetVersion.Text = ""; CTLM.SetStatus(EnumStatus.SEARCH); CTLM.Button_Click("btnOk"); Application.DoEvents(); while (!CTLM.EOF) { CTLM.ShowRSValues(); Application.DoEvents(); if (txtVersion.Text != txtNetVersion.Text) { int i = CTLM.RSPosition; CTLM.SetStatus(EnumStatus.EDIT); txtVersion.Text = txtNetVersion.Text; CTLM.Button_Click("btnOk"); Application.DoEvents(); CTLM.ClearValues(); txtNetVersion.Text = ""; CTLM.SetStatus(EnumStatus.SEARCH); CTLM.Button_Click("btnOk"); Application.DoEvents(); CTLM.setRSPosition(i); } txtNetVersion.Text = ""; CTLM.Button_Click("btnNext"); } }
private void btnClose_Click(object sender, EventArgs e) { // Launch the robot process. using (var _sp = new SP(Values.gDatos, "pSimpleDeliveriesChangeStatus")) { bool _closed = lstFlags.itemStatus("CLOSED"); _sp.AddParameterValue("@DeliveryNumber", txtDeliveryN.Text); _sp.AddParameterValue("@Service", cboService.Value.ToString()); _sp.AddParameterValue("@Action", _closed ? "OPEN" : "CLOSE"); try { _sp.Execute(); } catch (Exception ex) { MsgError("Error launching process: " + ex.Message); return; } if (_sp.LastMsg.Substring(0, 2) != "OK") { MsgError(_sp.LastMsg); return; } CTLM.Button_Click("btnCancel"); ChangeButtonsStatus(); MessageBox.Show(string.Format("Delivery {0} OK.", _closed ? "opened" : "closed"), "Info", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
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 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 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 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 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(); }
private void DataGridView_SelectionChanged(object sender, EventArgs e) { if (VS.DataGridView.CurrentCell != null && !changing) { changing = true; CTLM.ClearValues(); VS.DataGridView.Rows[VS.DataGridView.CurrentCell?.RowIndex ?? 0].Selected = true; CTLM.SetStatus(CommonTools.EnumStatus.SEARCH); txtTypeCode.Text = VS.CurrentRow.Cells[0].Value.ToString(); txtSection.Text = VS.CurrentRow.Cells[1].Value.ToString(); txtTitle.Text = VS.CurrentRow.Cells[2].Value.ToString(); CTLM.Button_Click(CTLMButtonsEnum.btnOk); changing = false; } }
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(); }
private void btnExportReceival_Click(object sender, EventArgs e) { int _numReceival; MessageBox.Show("This functionality has been disabled.", "SIMPLISTICA", MessageBoxButtons.OK, MessageBoxIcon.Error); return; if (txtReceivalCode.Text == "") { MessageBox.Show("Wrong receival code.", "SIMPLISTICA", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } using (var _sp = new SP(Values.gDatos, "pHSAExportReceival")) { _sp.AddParameterValue("@RecCode", txtReceivalCode.Text); _sp.AddParameterValue("@cod3", Values.COD3); try { _sp.Execute(); } catch (Exception ex) { CTWin.MsgError(ex.Message); return; } if (_sp.LastMsg.Substring(0, 2) != "OK") { CTWin.MsgError(_sp.LastMsg); return; } _numReceival = _sp.LastMsg.Substring(4).ToInt(); } CTLM.Refresh(); MessageBox.Show(string.Format("HSA receival exported to LOGISTICA receival {1}.", _numReceival), "SIMPLISTICA", MessageBoxButtons.OK, MessageBoxIcon.Information); }
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(); }
private void btnLabelCMs_Click(object sender, EventArgs e) { if (MessageBox.Show("This will generate and print all CMs. Are you sure?", "SIMPLISTICA", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { //printer preparation string _printerAddress = ""; int _printerResolution = 0; if (Values.LabelPrinterAddress == "") { CTWin.MsgError("Select a label printer first in preferences."); return; } using (var _RS = new DynamicRS(string.Format("select descripcion,cmp_varchar,cmp_integer from ETIQUETAS..datosEmpresa where codigo='{0}'", Values.LabelPrinterAddress), Values.gDatos)) { _RS.Open(); _printerAddress = _RS["cmp_varchar"].ToString(); _printerResolution = Convert.ToInt32(_RS["cmp_integer"]); //_printerType = _RS["descripcion"].ToString().Split('|')[0]; } //label preparation var _label = new ZPLLabel(70, 31, 3, _printerResolution); var _CMLabel = new MicroCM(_label); //sp preparation using (var _printer = new cRawPrinterHelper(_printerAddress)) using (var _sp = new SP(Values.gDatos, "PGenerar_Paletags_linea")) { var _delimiterLabel = new ZPLLabel(_CMLabel.Label.width, _CMLabel.Label.height, 3, _CMLabel.Label.dpi); delimiterLabel.delim(_delimiterLabel, "START RECEIVAL", txtEntrada.Text); _printer.SendUTF8StringToPrinter(_delimiterLabel.ToString(), 1); //we will check line by line VS.ToList().Where(r => r.Cells[0].Value.ToString() != "").ToList().ForEach(r => { //first we generate the cms try { generateCM(Convert.ToInt32(txtEntrada.Value), Convert.ToInt32(r.Cells[1].Value)); } catch (Exception ex) { CTWin.MsgError(ex.Message); CTLM.StatusMsg(ex.Message); } //delimiter delimiterLabel.delim(_delimiterLabel, "LINE", r.Cells[1].Value.ToString()); _printer.SendUTF8StringToPrinter(_delimiterLabel.ToString(), 1); // then we print the labels using (var _rs = new DynamicRS(string.Format("Select cp.CM,cp.Entrada,cp.Linea,cp.Partnumber,cp.QTY,cp.xfec,c.Doc_Proveedor from CMS_PALETAGS cp inner join cab_Recepcion c on c.entrada=cp.entrada where cp.Entrada='{0}' and Linea='{1}'", Convert.ToInt32(txtEntrada.Value), Convert.ToInt32(r.Cells[1].Value)), Values.gDatos)) { _rs.Open(); _rs.ToList().ForEach(row => { _CMLabel.Parameters["CM"] = row["CM"].ToString(); _CMLabel.Parameters["RECEIVAL"] = row["Entrada"].ToString(); _CMLabel.Parameters["RECEIVAL_DATE"] = row["xfec"].ToString(); _CMLabel.Parameters["PARTNUMBER"] = row["Partnumber"].ToString(); _CMLabel.Parameters["QTY"] = row["QTY"].ToString(); if (!_printer.SendUTF8StringToPrinter(_CMLabel.ToString(), 1)) { CTWin.MsgError(string.Format("Error printing label {0}.", row["CM"])); } }); } delimiterLabel.delim(_delimiterLabel, "END RECEIVAL", txtEntrada.Text); _printer.SendUTF8StringToPrinter(_delimiterLabel.ToString(), 1); }); lstFlags["PALETAGS"] = true; CTLM.StatusMsg("CMs generated OK."); } } MessageBox.Show("Label printing task finished.", "SIMPLISTICA", MessageBoxButtons.OK, MessageBoxIcon.Information); }
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; }