private void Form_Load(object sender, EventArgs e) { try { base.InProgramID = ProID; base.InProgramNM = ProNm; this.SetFunctionLabel(EProMode.SHOW); this.InitialControlArray(); Btn_F2.Text = "新規受注(F2)"; Btn_F10.Text = "出力(F10)"; //起動時共通処理 base.StartProgram(); //初期値セット ssbl = new TempoJuchuuShoukai_BL(); string ymd = ssbl.GetDate(); CboStoreCD.Bind(ymd); //検索用のパラメータ設定 string stores = GetAllAvailableStores(); ScJuchuuNO.Value1 = InOperatorCD; ScJuchuuNO.Value2 = stores; ScJuchuuNOTo.Value1 = InOperatorCD; ScJuchuuNOTo.Value2 = stores; ScCustomer.Value1 = "1"; SetFuncKeyAll(this, "110001000010"); Scr_Clr(0); } catch (Exception ex) { //エラー時共通処理 MessageBox.Show(ex.Message); EndSec(); } }
/// <summary> /// 画面クリア(0:全項目、1:KEY部以外) /// </summary> /// <param name="Kbn"></param> private void Scr_Clr(short Kbn) { foreach (Control ctl in detailControls) { if (ctl.GetType().Equals(typeof(CKM_Controls.CKM_CheckBox))) { ((CheckBox)ctl).Checked = false; } else if (ctl.GetType().Equals(typeof(Panel))) { } else if (ctl.GetType().Equals(typeof(CKM_Controls.CKM_ComboBox))) { ((CKM_Controls.CKM_ComboBox)ctl).SelectedIndex = -1; } else { ctl.Text = ""; } } //foreach (Control ctl in detailLabels) //{ // ((CKM_SearchControl)ctl).LabelText = ""; //} //初期値セット string ymd = ssbl.GetDate(); //スタッフマスター(M_Staff)に存在すること //[M_Staff] M_Staff_Entity mse = new M_Staff_Entity { StaffCD = InOperatorCD, ChangeDate = ymd }; Staff_BL bl = new Staff_BL(); bool ret = bl.M_Staff_Select(mse); if (ret) { CboStoreCD.SelectedValue = mse.StoreCD; } //[M_Store] M_Store_Entity mse2 = new M_Store_Entity { StoreCD = mse.StoreCD, ChangeDate = ymd }; Store_BL sbl = new Store_BL(); DataTable dt = sbl.M_Store_Select(mse2); if (dt.Rows.Count > 0) { } else { bbl.ShowMessage("E133"); EndSec(); } ((CheckBox)detailControls[(int)EIndex.ChkAll]).Checked = true; ((CheckBox)detailControls[(int)EIndex.ChkTujo]).Checked = true; ((CheckBox)detailControls[(int)EIndex.ChkHenpin]).Checked = true; ((CheckBox)detailControls[(int)EIndex.ChkHachuAll]).Checked = true; GvDetail.DataSource = null; GvDetail.Enabled = false; Btn_F10.Enabled = false; }