protected override ResultStatus Open() { base.Open(); txtSDate.DateTimeValue = GlobalInfo.OCF_DATE; lupSubType = new RepositoryItemLookUpEdit(); #if DEBUG txtSDate.DateTimeValue = DateTime.ParseExact("2018/06/15", "yyyy/MM/dd", null); this.Text += "(開啟測試模式),ocfDate=2018/06/15"; #endif //1.契約類別 下拉選單 //DataTable dtSubType = new COD().ListByCol("48010" , "PDK_SUBTYPE " , "全選" , "%"); //第一行全選 + COD_ID / COD_DESC / COD_SEQ_NO // //ken,特殊,再往上新增一筆 //DataRow drTemp = dtSubType.NewRow(); //drTemp["COD_ID"] = " "; //drTemp["COD_DESC"] = ChooseSingleKind; //drTemp["COD_SEQ_NO"] = -1; //dtSubType.Rows.InsertAt(drTemp , 0); DataTable dtSubType = new CODW().ListLookUpEdit("48010", "48010_PDK_SUBTYPE"); Extension.SetDataTable(ddlSubType, dtSubType, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); lupSubType.SetColumnLookUp(dtSubType, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, null); gcMain.RepositoryItems.Add(lupSubType); //ken,設定選單事件 this.ddlSubType.EditValueChanged += new System.EventHandler(this.ddlSubType_EditValueChanged); //2.契約代號 下拉選單 DataTable dtKind = dao48010.ListKind(); //MGT2_SEQ_NO/MGT2_KIND_ID/MGT2_PROD_SUBTYPE Extension.SetDataTable(ddlKind, dtKind, "MGT2_KIND_ID", "MGT2_KIND_ID", TextEditStyles.DisableTextEditor, ""); //3.資料內容 下拉選單 //List<LookupItem> lstData = new List<LookupItem>(){ // new LookupItem() { ValueMember = "KeyInfo", DisplayMember = "1.重點資料"}, // new LookupItem() { ValueMember = "Detail", DisplayMember = "2.明細資料" }}; DataTable dtData = new CODW().ListLookUpEdit("48010", "48010_DATA_TYPE"); Extension.SetDataTable(ddlData, dtData, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); //ken,設定選單事件 this.ddlData.EditValueChanged += new System.EventHandler(this.ddlData_EditValueChanged); //4.排序方式 下拉選單 //List<LookupItem> lstSort = new List<LookupItem>(){ // new LookupItem() { ValueMember = "DATE", DisplayMember = "1.依系統生效日期排序"}, // new LookupItem() { ValueMember = "KIND", DisplayMember = "2.依契約類別排序" }}; DataTable dtSort = new CODW().ListLookUpEdit("48010", "48010_SORT_TYPE"); Extension.SetDataTable(ddlSort, dtSort, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); return(ResultStatus.Success); }
protected override ResultStatus Open() { base.Open(); txtSDate.DateTimeValue = GlobalInfo.OCF_DATE; lupSubType = new RepositoryItemLookUpEdit(); #if DEBUG txtSDate.DateTimeValue = DateTime.ParseExact("2018/06/15", "yyyy/MM/dd", null); this.Text += "(開啟測試模式),ocfDate=2018/06/15"; #endif //1.契約類別 下拉選單 DataTable dtSubType = new CODW().ListLookUpEdit("APDK", "APDK_PROD_SUBTYPE", _ProgramID); // 全選:'%' / 單一契約:' ' Extension.SetDataTable(ddlSubType, dtSubType, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor); lupSubType.SetColumnLookUp(dtSubType, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, null); gcMain.RepositoryItems.Add(lupSubType); //ken,設定選單事件 this.ddlSubType.EditValueChanged += new System.EventHandler(this.ddlSubType_EditValueChanged); //2.契約代號 下拉選單 DataTable dtKind = dao48010.ListKind(); //MGT2_SEQ_NO/MGT2_KIND_ID/MGT2_PROD_SUBTYPE Extension.SetDataTable(ddlKind, dtKind, "MGT2_KIND_ID", "MGT2_KIND_ID", TextEditStyles.DisableTextEditor, ""); //3.資料內容 下拉選單 DataTable dtData = new CODW().ListLookUpEdit("HCPR", "DATA_TYPE"); Extension.SetDataTable(ddlData, dtData, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); //ken,設定選單事件 this.ddlData.EditValueChanged += new System.EventHandler(this.ddlData_EditValueChanged); //4.排序方式 下拉選單 DataTable dtSort = new CODW().ListLookUpEdit("HCPR", "SORT_TYPE"); Extension.SetDataTable(ddlSort, dtSort, "CODW_ID", "CODW_DESC", TextEditStyles.DisableTextEditor, ""); return(ResultStatus.Success); }