Esempio n. 1
0
 internal void ChangeSPM(StandardProcessModel sPM, String Location)
 {
     if (Location.Equals("Up"))
     {
         for (int i = 0; i < this.pnl_View.Controls.Count; i++)
         {
             UCStandardProcess ucsp = (UCStandardProcess)pnl_View.Controls[i];
             if (ucsp.SPM.Sort == sPM.Sort && ucsp.SPM.No != sPM.No)
             {
                 ucsp.SPM.Sort += 1;
                 ucsp.SetData();
             }
         }
     }
     if (Location.Equals("Down"))
     {
         for (int i = 0; i < this.pnl_View.Controls.Count; i++)
         {
             UCStandardProcess ucsp = (UCStandardProcess)pnl_View.Controls[i];
             if (ucsp.SPM.Sort == sPM.Sort && ucsp.SPM.No != sPM.No)
             {
                 ucsp.SPM.Sort -= 1;
                 ucsp.SetData();
             }
         }
     }
     ControllerSorting();
 }
Esempio n. 2
0
 private void ControllerSorting()
 {
     pnl_View.VerticalScroll.Value = 0;
     for (int i = 0; i < this.pnl_View.Controls.Count; i++)
     {
         UCStandardProcess ucsp = (UCStandardProcess)pnl_View.Controls[i];
         ucsp.Location = new Point(10, (ucsp.SPM.Sort - 1) * 100);
     }
 }
Esempio n. 3
0
        private void MakeUCProcess(List <StandardProcessModel> list)
        {
            foreach (StandardProcessModel spm in list)
            {
                UCStandardProcess ucsp = new UCStandardProcess(this);

                ucsp.SPM = spm;
                ucsp.Tag = spm.No;
                pnl_View.Controls.Add(ucsp);
                ucsp.Visible = true;
                ControllerSorting();
            }
        }
Esempio n. 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            List <StandardProcessModel> SPMs = new List <StandardProcessModel>();

            for (int i = 0; i < this.pnl_View.Controls.Count; i++)
            {
                UCStandardProcess ucsp = (UCStandardProcess)pnl_View.Controls[i];

                SPMs.Add(ucsp.SPM);
            }
            _StandardProcessController.UpdateStandardProcess(SPMs);

            ResetData();
        }
Esempio n. 5
0
 public StandardTextModal(UCStandardProcess uCStandardProcess, StandardProcessModel spm)
 {
     InitializeComponent();
     _UCStandardProcess = uCStandardProcess;
     SPM = spm;
 }