private void continueEditStonesButton_Click(object sender, EventArgs e) { foreach (DataGridViewRow myRow in gvEditStones.Rows) { int iQuantity = 0; string sShape = ""; decimal dPoints = 0; string sType = ""; string sClarity = ""; string sColor = ""; if (myRow.Cells[COLUMN_QUANTITY].Value != null && !string.IsNullOrEmpty(myRow.Cells[COLUMN_QUANTITY].Value.ToString().Trim())) { if (ValidateRowHasValidValues(myRow)) { iQuantity = Convert.ToInt32(myRow.Cells[COLUMN_QUANTITY].EditedFormattedValue); //if (myRow.Cells[COLUMN_SHAPE] != null) sShape = Utilities.GetStringValue(myRow.Cells[COLUMN_SHAPE].EditedFormattedValue, ""); //if (myRow.Cells[COLUMN_POINTS] != null) dPoints = Utilities.GetDecimalValue(myRow.Cells[COLUMN_POINTS].EditedFormattedValue, 0); //if (myRow.Cells[COLUMN_TYPE] != null) sType = Utilities.GetStringValue(myRow.Cells[COLUMN_TYPE].EditedFormattedValue, ""); //if (myRow.Cells[COLUMN_CLARITY] != null) sClarity = Utilities.GetStringValue(myRow.Cells[COLUMN_CLARITY].EditedFormattedValue, ""); if (myRow.Cells[COLUMN_COLOR] != null) { sColor = Utilities.GetStringValue(myRow.Cells[COLUMN_COLOR].EditedFormattedValue, ""); } if (iQuantity > 0 && dPoints > 0) { AddAttributeAnswer(myRow.Index, ATTRIBUTE_CODE_QUANTITY, iQuantity.ToString()); AddAttributeAnswer(myRow.Index, ATTRIBUTE_CODE_SHAPE, sShape); AddAttributeAnswer(myRow.Index, ATTRIBUTE_CODE_POINTS, dPoints.ToString()); AddAttributeAnswer(myRow.Index, ATTRIBUTE_CODE_TYPE, sType); AddAttributeAnswer(myRow.Index, ATTRIBUTE_CODE_CLARITY, sClarity); AddAttributeAnswer(myRow.Index, ATTRIBUTE_CODE_COLOR, sColor); } } else { MessageBox.Show("You entered an invalid data type. Please re-enter", "Validation", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } } if (typeof(DescribeItem) == ReturnForm.GetType()) { ((DescribeItem)ReturnForm).AddDescribeStonesAttributes(Jewelry); int length = ((DescribeItem)ReturnForm).GenerateDynamicTicketDescriptionLength(); if (length > 200) { MessageBox.Show("Description length must be less than 200, current length = " + length.ToString(), "Retail Amount Validation", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } this.Close(); }
public EditarEmpresaForm(ReturnForm caller) : base(caller) { InitializeComponent(); this.Text = "Nueva Empresa"; comboBoxRubro.Items.Add(""); Empresa.getDetalle().ForEach(detalle => comboBoxRubro.Items.Add(detalle)); }
public int Return_Update(ReturnForm rtn) { using (var context = new eToolsContext()) { //RentalDetail item = context.RentalDetails.Where(x => (x.RentalDetailID == rtn.ID)).FirstOrDefault(); //RentalDetail item2 = new RentalDetail(); //item2 = item; //item2.Comments = rtn.CustomerCommets == null ? "" : rtn.CustomerCommets; //can be null //item2.ConditionIn = rtn.CoditionCommets == null ? "" : rtn.CoditionCommets; RentalDetail rdptr = context.RentalDetails.Where(x => (x.RentalDetailID == rtn.ID)).FirstOrDefault(); RentalDetail item = new RentalDetail(); if (rdptr == null) { throw new BusinessRuleException("No such rental exists!", logger); } else { item.RentalDetailID = rtn.ID; item.RentalID = rdptr.RentalID; item.RentalEquipmentID = rdptr.RentalEquipmentID; item.Days = rdptr.Days; item.DailyRate = rdptr.DailyRate; item.ConditionOut = rdptr.ConditionOut; item.ConditionIn = string.IsNullOrEmpty(rtn.CoditionCommets) ? "" : rtn.CoditionCommets; item.DamageRepairCost = rdptr.DamageRepairCost; item.Comments = string.IsNullOrEmpty(rtn.CustomerCommets) ? "" : rtn.CustomerCommets; } context.Entry(item).State = System.Data.Entity.EntityState.Modified; return(context.SaveChanges()); } }
private void Return_Click(object sender, EventArgs e) { if (returnForm == null) { returnForm = new ReturnForm(_unitOfWork); } returnForm.ShowDialog(); }
public DevolucionesForm(ReturnForm caller) : base(caller) { InitializeComponent(); setearTablaFacturasDevolucion(); dateTimePickerFechaPagoDesde.Value = Program.FechaEjecucion; dateTimePickerFechaPagoHasta.Value = Program.FechaEjecucion; //dateTimePickerFechaPagoHasta.MaxDate = DateTime.Today; }
public ListadoEstadisticoForm(ReturnForm caller) : base(caller) { InitializeComponent(); dateTimePickerAnio.Value = Program.FechaEjecucion; cargarTrimestres(); comboBoxTrimestre.SelectedItem = 1; cargarOpcionesInformes(); }
public EditarSucursalForm(ReturnForm caller, Sucursal sucursalAEditar) : base(caller) { this.sucursalAEditar = sucursalAEditar; InitializeComponent(); Nombre = sucursalAEditar.nombre; // cargo los campos con los datos de la sucursal Direccion = sucursalAEditar.direccion; Codigo_Postal = sucursalAEditar.codigoPostal; Habilitado = sucursalAEditar.habilitado; }
public EditarRolForm(ReturnForm caller) : base(caller) { rolEditar = new Rol(); InitializeComponent(); accesos = Acceso.getTablaDe(0); dataGridViewRol.DataSource = accesos; dataGridViewRol.Columns["Id_Acceso"].Visible = false; //dataGridViewRol.Columns["Nombre"].ReadOnly = true; dataGridViewRol.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; accesosDisponibles = Acceso.getTablaDeDisponibles(rolEditar.id); comboBox1.DataSource = accesosDisponibles; comboBox1.DisplayMember = "Nombre"; comboBox1.ValueMember = "Id_Acceso"; }
public EditarFacturaForm(ReturnForm caller) : base(caller) { InitializeComponent(); FechaAlta = Program.FechaEjecucion; FechaVencimiento = Program.FechaEjecucion; DataRow fila = cargarFila(); facturaAEditar = new Factura(fila); dt = new DataTable(); dt.Columns.Add(new DataColumn("Cantidad", System.Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("Monto", System.Type.GetType("System.Decimal"))); }
public RendicionForm(ReturnForm caller) : base(caller) { InitializeComponent(); FechaRendicion = Program.FechaEjecucion; cargarEmpresas(); //dateTimePickerFechaRendicion.MaxDate = DateTime.Today; tablaFacturas.Columns.Add("Numero Factura", typeof(decimal)); tablaFacturas.Columns.Add("Empresa", typeof(string)); tablaFacturas.Columns.Add("Cliente", typeof(string)); tablaFacturas.Columns.Add("Monto", typeof(float)); tablaFacturas.Columns.Add("Fecha de Pago", typeof(DateTime)); }
private void button2_Click(object sender, EventArgs e) { if (radioButton1.Checked) { var search = new Search(); search.Show(); this.Hide(); } if (radioButton2.Checked) { var returnFrm = new ReturnForm(); returnFrm.Show(); this.Hide(); } }
public EditarEmpresaForm(ReturnForm caller, Empresa empresaAEditar) : base(caller) { edicion = true; this.editarEmpresa = empresaAEditar; InitializeComponent(); this.Text = "Editar Empresa"; comboBoxRubro.Items.Add(""); Empresa.getDetalle().ForEach(detalle => comboBoxRubro.Items.Add(detalle)); Nombre = empresaAEditar.nombre; // cargo los campos con los datos del cliente Cuit = empresaAEditar.cuit; Direccion = empresaAEditar.direccion; Rubro = empresaAEditar.rubro; Habilitado = empresaAEditar.habilitado; }
public EditarFacturaForm(ReturnForm caller, Factura factura) : base(caller) { InitializeComponent(); Factura = factura; edicion = true; dt = new DataTable(); dt.Columns.Add(new DataColumn("Cantidad", System.Type.GetType("System.Int32"))); dt.Columns.Add(new DataColumn("Monto", System.Type.GetType("System.Decimal"))); Empresa = new Empresa(Empresa.getXsConFiltros("", factura.cuitEmpresa, "").Rows[0]); dt = Factura.getDetalle(); textBoxNumeroFactura.ReadOnly = true; DataGridViewDetalleFactura.DataSource = dt; }
public EditarClienteForm(ReturnForm caller, Cliente clienteAEditar) : base(caller) { this.clienteAEditar = clienteAEditar; InitializeComponent(); Nombre = clienteAEditar.nombre; // cargo los campos con los datos del cliente Apellido = clienteAEditar.apellido; DNI = clienteAEditar.dni; Domicilio = clienteAEditar.domicilio; Numero = clienteAEditar.numero; Piso = clienteAEditar.piso; Dpto = clienteAEditar.dpto; Localidad = clienteAEditar.localidad; Telefono = clienteAEditar.telefono; Mail = clienteAEditar.mail; FechaNac = clienteAEditar.fechaNac; CodigoPostal = clienteAEditar.codigoPostal; Habilitado = clienteAEditar.habilitado; }
public EditarRolForm(ReturnForm caller, Rol rolEditar) : base(caller) { edicion = true; this.rolEditar = rolEditar; InitializeComponent(); accesos = Acceso.getTablaDe(rolEditar.id); dataGridViewRol.DataSource = accesos; dataGridViewRol.Columns["Id_Acceso"].Visible = false; //dataGridViewRol.ReadOnly = true; dataGridViewRol.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; accesosDisponibles = Acceso.getTablaDeDisponibles(rolEditar.id); comboBox1.DataSource = accesosDisponibles; comboBox1.DisplayMember = "Nombre"; comboBox1.ValueMember = "Id_Acceso"; Nombre = rolEditar.nombre; Habilitado = rolEditar.habilitado; }
public RegistroPagoForm(ReturnForm caller) : base(caller) { InitializeComponent(); FechaCobro = Program.FechaEjecucion; FechaVencimiento = Program.FechaEjecucion; cargarEmpresas(); cargarMediosDePago(); labelSucursal.Text += Usuario.sucursalSeleccionada.nombre; tablaFacturas.Columns.Add("Numero Factura", typeof(decimal)); tablaFacturas.Columns.Add("Empresa", typeof(string)); tablaFacturas.Columns.Add("Fecha de Vencimiento", typeof(DateTime)); tablaFacturas.Columns.Add("Importe", typeof(float)); tablaFacturas.PrimaryKey = new DataColumn[] { tablaFacturas.Columns["Numero Factura"] }; actualizarTablaFacturas(); }
private void returnMenuItem_Click(object sender, EventArgs e) { var rc = from Control c in m_reportTab.Controls where c is ReportControl select c; ReportControl report = rc.First() as ReportControl; var ic = from Control c in m_inventoryTab.Controls where c is InventoryControl select c; InventoryControl inventory = ic.First() as InventoryControl; ReturnForm rf = new ReturnForm(ref m_register, ref inventory, ref report); rf.ShowDialog(); }
public NuevoClienteForm(ReturnForm caller) : base(caller) { InitializeComponent(); dateTimePickerFechaNacimiento.Value = Program.FechaEjecucion; }
public ABMEmpresaForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
public ItemEditarForm(ReturnForm caller, DataRow item) : base(caller) { InitializeComponent(); Item = item; }
public NuevaSucursalForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
public SeleccionarFuncionalidadForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
public SeleccionarClienteForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
public SeleccionarEmpresaForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
public TablaEmpresaForm(ReturnForm caller) : base(caller) { InitializeComponent(); comboBoxRubro.Items.Add(""); Empresa.getDetalle().ForEach(detalle => comboBoxRubro.Items.Add(detalle)); }
public TablaFacturaForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
public ABMClienteForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
public SeleccionarSucursalForm(ReturnForm caller) : base(caller) { InitializeComponent(); }
private void exitPage(bool bSuccess, int iIdx) { this.Hide(); if (typeof(Common.Libraries.Forms.Pawn.Products.DescribeMerchandise.DescribeMerchandise) == ReturnForm.GetType()) { ((Common.Libraries.Forms.Pawn.Products.DescribeMerchandise.DescribeMerchandise)ReturnForm).ReturnFromManufacturerModelMerchandise(bSuccess, iIdx); } this.Close(); }