Exemplo n.º 1
0
 private void SetData(JBus Auto)
 {
     Auto.Code      = this._Code;
     Auto.Active    = checkedActive.Checked;
     Auto.BUSNumber = Convert.ToDouble(txtBCode.Text);
     Auto.CarCode   = _AutomobileCode;
     Auto.FleetCode = (int)cmbFleet.SelectedValue;
 }
Exemplo n.º 2
0
        private void LoadData(int PCode)
        {
            JBus Bus = new JBus();

            Bus.GetData(PCode);
            txtBCode.Text          = Bus.BUSNumber.ToString();
            cmbFleet.SelectedValue = Bus.FleetCode;
            checkedActive.Checked  = Bus.Active;
            _AutomobileCode        = Bus.CarCode;

            SetPelaq();
            jArchiveList1.ObjectCode = PCode;
        }
Exemplo n.º 3
0
        private bool Save()
        {
            bool result = false;

            if (!Validate())
            {
                return(false);
            }
            JBus objAutoDefine = new JBus();

            SetData(objAutoDefine);
            if (State == ClassLibrary.JFormState.Insert)
            {
                _Code  = objAutoDefine.Insert();
                result = _Code > 0;
                if (result)
                {
                    State = ClassLibrary.JFormState.Update;
                }
            }
            else
            if (State == ClassLibrary.JFormState.Update)
            {
                result = objAutoDefine.Update();
            }

            if (jArchiveList1.ObjectCode == 0)
            {
                jArchiveList1.ObjectCode = _Code;
            }

            jArchiveList1.ArchiveList();
            if (result)
            {
                jPropertyValue.ValueObjectCode = _Code;
                jPropertyValue.Save();
            }
            return(result);
        }