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(); }
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); } }
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(); } }
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(); }
public StandardTextModal(UCStandardProcess uCStandardProcess, StandardProcessModel spm) { InitializeComponent(); _UCStandardProcess = uCStandardProcess; SPM = spm; }