Exemple #1
0
 private void SetData(JLine objLine)
 {
     objLine.Code       = Code;
     objLine.LineName   = txtLineName.Text;
     objLine.LineNumber = Convert.ToDouble(txtLineNumber.Text);
     objLine.LineType   = (int)JcmbLineType.SelectedValue;
     objLine.Fleet      = (int)JcmbFleet.SelectedValue;
     objLine.ZoneCode   = (int)JCmbZoneCode.SelectedValue;
     objLine.Status     = checkState.Checked;
     objLine.Rotate     = checkRotate.Checked;
 }
Exemple #2
0
        private void Load1(int PCode)
        {
            JLine objLine = new JLine();

            objLine.GetData(PCode);
            txtLineName.Text   = objLine.LineName;
            txtLineNumber.Text = objLine.LineNumber.ToString();

            //JcmbLineType.SelectedValue = objLine.LineType;
            JLineTypes MC = new JLineTypes();

            MC.SetComboBox(JcmbLineType, objLine.LineType);
            JCmbZoneCode.SelectedValue = objLine.ZoneCode;
            JcmbFleet.SelectedValue    = objLine.Fleet;

            checkState.Checked  = objLine.Status;
            checkRotate.Checked = objLine.Rotate;
        }
Exemple #3
0
        private int Save()
        {
            JLine objAutoDefine = new JLine();

            SetData(objAutoDefine);
            if (State == ClassLibrary.JFormState.Insert)
            {
                Code = objAutoDefine.Insert();
            }
            else
            if (State == ClassLibrary.JFormState.Update)
            {
                objAutoDefine.Update();
            }
            State = ClassLibrary.JFormState.Update;

            return(Code);
        }