public override void Crear() { base.Crear(); this.Fecha = DateTime.Now; this.Encargado = new Lbl.Personas.Persona(this.Connection, Lbl.Sys.Config.Actual.UsuarioConectado.Id); this.Estado = 1; this.Tipo = new Lbl.Tareas.Tipo(this.Connection, 99); }
public override void OnLoad() { if (m_Registro != null) { if (this.GetFieldValue<int>("id_tipo_ticket") != 0) this.Tipo = new Tipo(this.Connection, System.Convert.ToInt32(this.Registro["id_tipo_ticket"])); else this.Tipo = null; if (this.GetFieldValue<int>("id_persona") != 0) this.Cliente = new Personas.Persona(this.Connection, this.GetFieldValue<int>("id_persona")); else this.Cliente = null; if (this.GetFieldValue<int>("id_tecnico_recibe") != 0) this.Encargado = new Personas.Persona(this.Connection, this.GetFieldValue<int>("id_tecnico_recibe")); else this.Encargado = null; if (this.GetFieldValue<int>("id_presupuesto") != 0) this.Presupuesto = new Comprobantes.Presupuesto(this.Connection, this.GetFieldValue<int>("id_presupuesto")); else this.Presupuesto = null; if (this.GetFieldValue<int>("id_comprob") != 0) this.Factura = new Comprobantes.ComprobanteFacturable(this.Connection, this.GetFieldValue<int>("id_comprob")); else this.Factura = null; } base.OnLoad(); }