private void ChangeMode(EOperationMode OperationMode) { base.OperationMode = OperationMode; switch (OperationMode) { case EOperationMode.INSERT: Clear(PanelHeader); Clear(PanelDetail); EnablePanel(PanelHeader); DisablePanel(PanelDetail); ScNormal.SearchEnable = false; ScCopy.SearchEnable = true; ScCopy.Enabled = true; F9Visible = false; F12Enable = true; btnDisplay.Enabled = F11Enable = true; break; case EOperationMode.UPDATE: case EOperationMode.DELETE: case EOperationMode.SHOW: Clear(PanelHeader); Clear(PanelDetail); EnablePanel(PanelHeader); DisablePanel(PanelDetail); ScNormal.SearchEnable = true; ScCopy.Enabled = false; F12Enable = false; btnDisplay.Enabled = F11Enable = true; break; } ScNormal.SetFocus(1); }
public override void FunctionProcess(int index) { CKM_SearchControl sc = new CKM_SearchControl(); switch (index + 1) { case 2: ChangeMode(EOperationMode.INSERT); break; case 3: ChangeMode(EOperationMode.UPDATE); break; case 4: ChangeMode(EOperationMode.DELETE); break; case 5: ChangeMode(EOperationMode.SHOW); break; case 6: if (bbl.ShowMessage("Q004") == DialogResult.Yes) { ChangeMode(OperationMode); ScNormal.SetFocus(1); } break; case 11: F11(); break; case 12: //*** CreatedBL.ShowMessage if (bbl.ShowMessage(OperationMode == EOperationMode.DELETE ? "Q102" : "Q101") == DialogResult.Yes) F12(); break; } }
private bool ErrorCheck(int index) { if (index == 11) { //HeaderCheck on F11 if (OperationMode == EOperationMode.INSERT) { if (type == 1)//New { if (!RequireCheck(new Control[] { ScNormal.TxtCode, ScNormal.TxtChangeDate })) { return(false); } if (ScNormal.IsExists()) { //***show Message mtsbl.ShowMessage("E132"); ScNormal.SetFocus(1); return(false); } } else//Copy { if (!RequireCheck(new Control[] { ScNormal.TxtCode, ScNormal.TxtChangeDate })) { return(false); } if (!ScCopy.IsExists()) { //*** show Message mtsbl.ShowMessage("E133"); return(false); } } } else { if (!ScNormal.IsExists()) { //*** Show Message mtsbl.ShowMessage("E133"); ScNormal.SetFocus(1); return(false); } } } else if (index == 12) { if (!RequireCheck(new Control[] { ScNormal.TxtCode, ScNormal.TxtChangeDate })) { return(false); } if (OperationMode == EOperationMode.INSERT) { if (ScNormal.IsExists()) { //*** ShowMessage //mtsbl.ShowMessage("E132"); ScNormal.SetFocus(1); return(false); } } //*** Insert Other Error Check } return(true); }