本文整理汇总了C#中SAPbouiCOM.ComboBox.Select方法的典型用法代码示例。如果您正苦于以下问题:C# ComboBox.Select方法的具体用法?C# ComboBox.Select怎么用?C# ComboBox.Select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SAPbouiCOM.ComboBox
的用法示例。
在下文中一共展示了ComboBox.Select方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Act2_DataSourcesBinding
/// <summary>
/// 폼(Form)의 아이템들(Items)에 연결이 필요한 데이타소스(DataSource) 형식을 정의합니다.
/// </summary>
private void Act2_DataSourcesBinding() {
// '// ADD YOUR ACTION CODE HERE ...
#region ComboBox
string sql = string.Empty;
//string sql = FN.GetSQL("KIS_SF0360A_001");
oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
oRS1 = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
// 기수
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboYEAR").Specific;
sql = string.Format(" SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE CODE = 'HR01' AND U_USEYN = 'Y'");
FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Nothing, null);
sql = string.Format(" SELECT LEFT(U_SMLNM,4) AS YEAR FROM [@KIS_AD00201] WHERE CODE = 'HR01' AND U_USEYN = 'Y' AND LEFT(U_SMLNM,4) = '{0}'",DateTime.Now.Year.ToString());
oRS.DoQuery(sql);
oComboBox.Select(oRS.Fields.Item("YEAR").Value.ToString(), BoSearchKey.psk_ByValue);
// 상태
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboSTATUS").Specific;
sql = string.Format(" SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE CODE = 'HR10' AND U_USEYN = 'Y'");
FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Nothing, null);
sql = string.Format(" SELECT U_RMK2 FROM [@KIS_AD00201] WHERE CODE = 'HR01' AND U_USEYN = 'Y' AND U_SMLCD = '{0}'",oForm.Items.Item("cboYEAR").Specific.Value);
oRS.DoQuery(sql);
oComboBox.Select(oRS.Fields.Item("U_RMK2").Value.ToString(), BoSearchKey.psk_ByValue);
#endregion
// 고과대상자
sql = string.Format(" select COUNT(*) from [@KIS_HR0120M]");
oRS.DoQuery(sql);
oForm.Items.Item("edtPERSON").Specific.Value = oRS.Fields.Item(0).Value.ToString();
}
示例2: Act2_DataSourcesBinding
/// <summary>
/// 폼(Form)의 아이템들(Items)에 연결이 필요한 데이타소스(DataSource) 형식을 정의합니다.
/// </summary>
private void Act2_DataSourcesBinding() {
// '// ADD YOUR ACTION CODE HERE ...
#region EditText
string ItemUID = "";
ItemUID = "edtEMPNO"; oForm.DataSources.UserDataSources.Add(ItemUID, BoDataType.dt_SHORT_TEXT, 30); FN.SetUserDataBind(oForm, ItemUID);//사원코드
ItemUID = "edtEMPNM"; oForm.DataSources.UserDataSources.Add(ItemUID, BoDataType.dt_SHORT_TEXT, 30); FN.SetUserDataBind(oForm, ItemUID);//사원코드
#endregion
#region ComboBox
string sql = string.Empty;
//string sql = FN.GetSQL("KIS_SF0360A_001");
oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
// 기수
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboYEAR").Specific;
sql = string.Format(" SELECT U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE CODE = 'HR01' AND U_USEYN = 'Y'");
FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Nothing, null);
sql = string.Format(" SELECT LEFT(U_SMLNM,4) AS YEAR FROM [@KIS_AD00201] WHERE CODE = 'HR01' AND U_USEYN = 'Y' AND LEFT(U_SMLNM,4) = '" + DateTime.Now.Year.ToString() + "'");
oRS.DoQuery(sql);
oComboBox.Select(oRS.Fields.Item("YEAR").Value.ToString(), BoSearchKey.psk_ByValue);
// 부서
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboDEPT").Specific;
sql = string.Format(" SELECT U_DEPTCD,U_DEPTNM FROM [@KIS_HR00401] WHERE U_USEYN = 'Y'");
oComboBox.ValidValues.Add("", "");
FN.QComboBind(ref oComboBox, sql, FN.Enum_WholeTp.m_Nothing, null);
#endregion
#region ChooseFromList
SAPbouiCOM.Conditions oCons = new SAPbouiCOM.Conditions();
//oCons = FN.GetConditionsWithQuery("CARDTYPE == S");
oCons = null;
FN.SetChooseFromListAdd(oForm, "KIS_HR0120", "edtEMPNO", "U_EMPNO", BoFormItemTypes.it_EXTEDIT, oCons);
#endregion
}
示例3: Act3_DefualtSetting
/// <summary>
/// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
/// </summary>
private void Act3_DefualtSetting() {
// '// ADD YOUR ACTION CODE HERE ...
#region Form Setting
oForm.DataBrowser.BrowseBy = "DocEntry";
oForm.SupportedModes = -1;
oForm.Settings.EnableRowFormat = false;
oForm.Settings.Enabled = false;
oForm.AutoManaged = true;
oForm.PaneLevel = 1;
#endregion
oForm.Mode = BoFormMode.fm_ADD_MODE;
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_FI0010M_HRD");
oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_FI00101_HRD");
string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.p_YYYYMMDD);
oDB_M.SetValue("U_DOCDATE", 0, strNowDate.Replace(".", ""));
oDB_M.SetValue("U_USERID", 0, B1Connections.theAppl.Company.UserName);
oComboBox = oForm.Items.Item("cboYYYY").Specific;
FN.SetComboBoxValidValues(oForm, " SELECT YEAR AS CODE, YEAR AS NAME FROM OACP ", "cboYYYY", FN.Enum_WholeTp.m_Nothing);
oComboBox.Select(FN.Left(strNowDate,4) , BoSearchKey.psk_ByValue);
oComboBox = oForm.Items.Item("cboTYPE").Specific;
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'FI01' AND U_USEYN = 'Y' ", "cboTYPE", FN.Enum_WholeTp.m_Nothing);
oComboBox.Select(0, BoSearchKey.psk_Index);
#region EditText
// 코스트센터그룹
SAPbouiCOM.Conditions oCons = new Conditions();
FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "edtCOSTFR", "Code", BoFormItemTypes.it_EDIT, oCons);
FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "edtCOSTTO", "Code", BoFormItemTypes.it_EDIT, oCons);
// 공통비 코스트센터 그룹
FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "edtCOMGPCD", "Code", BoFormItemTypes.it_EDIT, oCons);
// 원가그룹
FN.SetChooseFromListAdd(oForm, "KIS_CO0100", "edtDISACCD", "Code", BoFormItemTypes.it_EDIT, oCons);
FN.SetChooseFromListAdd(oForm, "KIS_CO0100", "edtCOPECD", "Code", BoFormItemTypes.it_EDIT, oCons);
FN.SetChooseFromListAdd(oForm, "KIS_CO0100", "edtCOAMCD", "Code", BoFormItemTypes.it_EDIT, oCons);
// 계정코드
#region GLAccounts Conditions
oCons = new Conditions();
SAPbouiCOM.Condition oCon = oCons.Add();
oCon.Alias = "U_CATEGORY";
oCon.Operation = BoConditionOperation.co_EQUAL;
oCon.CondVal = "S09";
#endregion
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtCOMPECD", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtCOMAMCD", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
#endregion
#region Matrix
oMatrix = oForm.Items.Item("mtx").Specific;
oMatrix.SelectionMode = BoMatrixSelect.ms_None;
// 메트릭스
FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "mtx", "Code", BoFormItemTypes.it_MATRIX, null, "U_PRCCD");
FN.SetSumField(ref oMatrix, "U_1MON,U_2MON,U_3MON,U_4MON,U_5MON,U_6MON,U_7MON,U_8MON,U_9MON,U_10MON,U_11MON,U_12MON");
//FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB_1, FN.RowSelectMode.SelectedLine, "U_PRCCD");
#endregion
#region SetAutoManagedAttribute
string AllString = "cboYYYY,cboTYPE,edtCOMGPCD,edtDISACCD,edtCOPECD,edtCOAMCD,edtCOMPECD,edtCOMAMCD,mtx,btnFIND";
string AddString = "cboYYYY,cboTYPE,edtCOMGPCD,edtDISACCD,edtCOPECD,edtCOAMCD,mtx,btnFIND";
string OKString = "edtCOMGPCD,edtDISACCD,edtCOPECD,edtCOAMCD,mtx,btnFIND";
string FindString = "cboYYYY,cboTYPE";
FN.SetAutoManagedAttribute(ref oForm, AllString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_All, BoModeVisualBehavior.mvb_False);
FN.SetAutoManagedAttribute(ref oForm, AddString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Add, BoModeVisualBehavior.mvb_True);
FN.SetAutoManagedAttribute(ref oForm, OKString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_True);
FN.SetAutoManagedAttribute(ref oForm, FindString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Find, BoModeVisualBehavior.mvb_True);
#endregion
}
示例4: ET_cboYEAR_AFComboSelect
public virtual void ET_cboYEAR_AFComboSelect(ItemEvent pVal)
{
oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
oComboBox = ((SAPbouiCOM.ComboBox)(oForm.Items.Item("cboYEAR").Specific));
// ADD YOUR ACTION CODE HERE ...
oForm.Items.Item("btnSAVE").Enabled = false;
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboSTATUS").Specific;
string sql = string.Format(" SELECT U_RMK2 FROM [@KIS_AD00201] WHERE CODE = 'HR01' AND U_USEYN = 'Y' AND U_SMLCD = '{0}'",oForm.Items.Item("cboYEAR").Specific.Value);
oRS.DoQuery(sql);
oComboBox.Select(oRS.Fields.Item("U_RMK2").Value.ToString(), BoSearchKey.psk_ByValue);
}
示例5: Act3_DefualtSetting
/// <summary>
/// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
/// </summary>
private void Act3_DefualtSetting() {
// '// ADD YOUR ACTION CODE HERE ...
#region Form Setting
oForm.DataBrowser.BrowseBy = "Code";
oForm.SupportedModes = -1;
oForm.Settings.EnableRowFormat = false;
oForm.Settings.Enabled = false;
oForm.AutoManaged = true;
oForm.PaneLevel = 1;
#endregion
oForm.Mode = BoFormMode.fm_FIND_MODE;
string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.p_YYYYMMDD);
oComboBox = oForm.Items.Item("Code").Specific;
FN.SetComboBoxValidValues(oForm, " SELECT YEAR AS CODE, YEAR AS NAME FROM OACP ", "Code", FN.Enum_WholeTp.m_Nothing);
oComboBox.Select(FN.Left(strNowDate,4), BoSearchKey.psk_ByValue);
oForm.Items.Item("btnTR").Enabled = false;
oForm.Items.Item("btnCAN").Enabled = false;
#region Matrix
oMatrix = oForm.Items.Item("mtx").Specific;
oMatrix.SelectionMode = BoMatrixSelect.ms_Single;
// 메트릭스
//FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB_1, FN.RowSelectMode.SelectedLine, "U_YYYYMM");
#endregion
}
示例6: ET_AFDataMenu_Add
public virtual void ET_AFDataMenu_Add(MenuEvent pVal) {
oForm = B1Connections.theAppl.Forms.ActiveForm;
// ADD YOUR ACTION CODE HERE ...
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_FI0010M_HRD");
oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_FI00101_HRD");
string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.p_YYYYMMDD);
oDB_M.SetValue("U_DOCDATE", 0, strNowDate.Replace(".", ""));
oDB_M.SetValue("U_USERID", 0, B1Connections.theAppl.Company.UserName);
oComboBox = oForm.Items.Item("cboYYYY").Specific;
oComboBox.Select(FN.Left(strNowDate, 4), BoSearchKey.psk_ByValue);
oComboBox = oForm.Items.Item("cboTYPE").Specific;
oComboBox.Select(0, BoSearchKey.psk_Index);
}
示例7: Act3_DefualtSetting
/// <summary>
/// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
/// </summary>
private void Act3_DefualtSetting() {
// '// ADD YOUR ACTION CODE HERE ...
try
{
#region Form Setting
oForm.SupportedModes = 1;
oForm.Settings.EnableRowFormat = false;
oForm.Settings.Enabled = false;
oForm.AutoManaged = true;
#endregion
#region ComboBox
string sql = string.Empty;
// 템플릿
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboTMPTYPE").Specific;
FN.SetComboBoxValidValues(oForm, " SELECT AbsId,Name FROM OFRT WHERE DocType = 'F' AND U_TMPTYPE = '2' ", "cboTMPTYPE", FN.Enum_WholeTp.m_Nothing);
oComboBox.Select(0, BoSearchKey.psk_Index);
#endregion
oForm.DataSources.UserDataSources.Item("optCOSTTY").ValueEx = "Y";
oForm.DataSources.UserDataSources.Item("optTYPE").ValueEx = "Y";
oForm.DataSources.UserDataSources.Item("edtFDATE").ValueEx = FN.Left(Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01"), 6);
oForm.DataSources.UserDataSources.Item("edtTDATE").ValueEx = FN.Left(Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01"), 6);
foreach (SAPbouiCOM.Item item in oForm.Items)
{
item.AffectsFormMode = false;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
}
示例8: Act3_DefualtSetting
/// <summary>
/// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
/// </summary>
private void Act3_DefualtSetting() {
// '// ADD YOUR ACTION CODE HERE ...
try
{
#region Form Setting
oForm.SupportedModes = 1;
oForm.Settings.EnableRowFormat = false;
oForm.Settings.Enabled = false;
oForm.AutoManaged = true;
#endregion
#region ComboBox
string sql = string.Empty;
// 사업장
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboBPLID").Specific;
FN.SetComboBoxValidValues(oForm, " SELECT BPLId,BPLName FROM OBPL ORDER BY BPLId ", "cboBPLID", FN.Enum_WholeTp.m_TotalTxt);
oComboBox.Select(1, BoSearchKey.psk_Index);
// 문서상태
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboSTATUS").Specific;
oComboBox.ValidValues.Add("", "전체");
oComboBox.ValidValues.Add("O", "미결");
oComboBox.ValidValues.Add("C", "마감");
oComboBox.Select(0, BoSearchKey.psk_Index);
#endregion
#region ChooseFromList
SAPbouiCOM.Conditions oCons = new Conditions();
// USER
#region User Conditions
oCons = new Conditions();
SAPbouiCOM.Condition oCon = oCons.Add();
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_User).ToString(), "edtBTFCRE", "USER_CODE", BoFormItemTypes.it_EDIT);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_User).ToString(), "edtAPPR", "USER_CODE", BoFormItemTypes.it_EDIT);
#endregion
// 계정코드
#region GLAccounts Conditions
oCons = new Conditions();
oCon = oCons.Add();
oCon.Alias = "Postable";
oCon.Operation = BoConditionOperation.co_EQUAL;
oCon.CondVal = "Y";
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtACCTCDF", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtACCTCDT", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
#endregion
// 코스트센터
#region ProfitCenter Conditions
oCons = new Conditions();
oCon = oCons.Add();
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtHPRCF", "PrcCode", BoFormItemTypes.it_EDIT);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtHPRCT", "PrcCode", BoFormItemTypes.it_EDIT);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtLPRCF", "PrcCode", BoFormItemTypes.it_EDIT);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtLPRCT", "PrcCode", BoFormItemTypes.it_EDIT);
#endregion
#endregion
#region grd
oForm.DataSources.DataTables.Add("grd");
oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
oGrid.SelectionMode = BoMatrixSelect.ms_Single;
SetGridTitle(oForm);
#endregion
#region default
DateTime dateDoc = DateTime.Today;
string strDate = " SELECT DATEADD(DD,-1,DATEADD(MM, 1, '" + Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01") + "')) ";
dateDoc = Convert.ToDateTime(FN.GetRecordsetValue(strDate));
oForm.DataSources.UserDataSources.Item("edtFDATE").ValueEx = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
oForm.DataSources.UserDataSources.Item("edtTDATE").ValueEx = Convert.ToDateTime(dateDoc).ToString("yyyyMMdd");
#endregion
foreach (SAPbouiCOM.Item item in oForm.Items)
{
item.AffectsFormMode = false;
}
}
catch (Exception ex)
{
B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
}
}
示例9: Act3_DefualtSetting
/// <summary>
/// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
/// </summary>
private void Act3_DefualtSetting() {
// '// ADD YOUR ACTION CODE HERE ...
#region Form Setting
oForm.SupportedModes = 1;
oForm.Settings.EnableRowFormat = false;
oForm.Settings.Enabled = false;
oForm.AutoManaged = true;
#endregion
#region ComboBox
string sql = string.Empty;
// 사업장
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboBPLID").Specific;
FN.SetComboBoxValidValues(oForm, " SELECT BPLId,BPLName FROM OBPL ORDER BY BPLId ", "cboBPLID", FN.Enum_WholeTp.m_TotalTxt);
oComboBox.Select(1, BoSearchKey.psk_Index);
// 입력경로
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboTRANSTY").Specific;
FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00101] WHERE Code = 'AD00' AND U_USEYN = 'Y' AND U_RMK2 <> 'N' ", "cboTRANSTY", FN.Enum_WholeTp.m_TotalTxt);
#endregion
#region ChooseFromList
SAPbouiCOM.Conditions oCons = new Conditions();
SAPbouiCOM.Condition oCon = oCons.Add();
// 코스트센터
#region ProfitCenter Conditions
oCons = new Conditions();
oCon = oCons.Add();
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtFRPRCCD", "PrcCode", BoFormItemTypes.it_EDIT);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtTOPRCCD", "PrcCode", BoFormItemTypes.it_EDIT);
#endregion
#endregion
#region default
DateTime dateDoc = DateTime.Today;
string strDate = " SELECT DATEADD(DD,-1,DATEADD(MM, 1, '" + Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01") + "')) ";
dateDoc = Convert.ToDateTime(FN.GetRecordsetValue(strDate));
oForm.DataSources.UserDataSources.Item("edtFRDT").ValueEx = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
oForm.DataSources.UserDataSources.Item("edtTODT").ValueEx = Convert.ToDateTime(dateDoc).ToString("yyyyMMdd");
#endregion
}
示例10: Act2_DataSourcesBinding
/// <summary>
/// 폼(Form)의 아이템들(Items)에 연결이 필요한 데이타소스(DataSource) 형식을 정의합니다.
/// </summary>
private void Act2_DataSourcesBinding()
{
// '// ADD YOUR ACTION CODE HERE ...
#region ComboBox
// 표코드
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboTYPE").Specific;
if (FN.GetRecordsetValue("SELECT Code FROM [@KIS_AD0020M_HRD]") != "")
{
FN.SetComboBoxValidValues(oForm, " SELECT Code,Name FROM [@KIS_AD0020M_HRD] ", "cboTYPE", FN.Enum_WholeTp.m_Nothing);
oComboBox.Select(0, BoSearchKey.psk_Index);
}
else
{
B1Connections.theAppl.StatusBar.SetText("결제라인표셋팅 등록후 사용해주세요.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
}
// 사용여부
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboUSEYN").Specific;
oComboBox.ValidValues.Add("Y", "Y");
oComboBox.ValidValues.Add("N", "N");
#endregion
#region EditText
// 사용자코드
#region GLAccounts Conditions
SAPbouiCOM.Conditions oCons = new Conditions();
SAPbouiCOM.Condition oCon = oCons.Add();
#endregion
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_User).ToString(), "edtUSERID", "USER_CODE", BoFormItemTypes.it_EDIT);
FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_User).ToString(), "Name", "U_NAME", BoFormItemTypes.it_EDIT);
#endregion
}
示例11: Act3_DefualtSetting
/// <summary>
/// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
/// </summary>
private void Act3_DefualtSetting() {
// '// ADD YOUR ACTION CODE HERE ...
#region Form Setting
oForm.DataBrowser.BrowseBy = "Code";
oForm.SupportedModes = -1;
oForm.Settings.EnableRowFormat = false;
oForm.Settings.Enabled = false;
oForm.AutoManaged = true;
#endregion
#region grd
oForm.DataSources.DataTables.Add("grd");
oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
oGrid.SelectionMode = BoMatrixSelect.ms_Single;
//SetGridTitle(oForm);
#endregion
#region default
if (FN.GetRecordsetValue("SELECT Code FROM [@KIS_AD0020M_HRD]") != "")
{
oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_AD0030M_HRD");
oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_AD00301_HRD");
StringBuilder pQuery = new StringBuilder();
LoginId = B1Connections.theAppl.Company.UserName;
SuperUSYN = FN.GetRecordsetValue(string.Format("SELECT SUPERUSER FROM OUSR WHERE USER_CODE = '{0}'", LoginId));
string strTYPE = oForm.Items.Item("cboTYPE").Specific.value.Trim();
oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboTYPE").Specific;
pQuery.Append(" SELECT COUNT(A.Code) FROM [@KIS_AD0030M_HRD] A ");
pQuery.Append(" WHERE A.Code = '{0}' AND A.U_TYPE = '{1}' ");
if (FN.GetRecordsetValue(string.Format(pQuery.ToString(), LoginId, strTYPE)) == "0")
{
oForm.Mode = BoFormMode.fm_ADD_MODE;
oDB_M.SetValue("U_USERID", 0, FN.GetRecordsetValue(string.Format("SELECT USER_CODE FROM OUSR WHERE USER_CODE = '{0}'", LoginId)));
oDB_M.SetValue("Name", 0, FN.GetRecordsetValue(string.Format("SELECT U_NAME FROM OUSR WHERE USER_CODE = '{0}'", LoginId)));
oComboBox.Select(0, BoSearchKey.psk_Index);
if (SuperUSYN == "Y")
{
oForm.Items.Item("edtUSERID").Enabled = true;
}
else
{
oForm.Items.Item("edtUSERID").Enabled = false;
}
}
else
{
oDB_M.SetValue("U_USERID", 0, FN.GetRecordsetValue(string.Format("SELECT USER_CODE FROM OUSR WHERE USER_CODE = '{0}'", LoginId)));
oDB_M.SetValue("Name", 0, FN.GetRecordsetValue(string.Format("SELECT U_NAME FROM OUSR WHERE USER_CODE = '{0}'", LoginId)));
SetFormLoadFromDBDatasource();
}
}
#endregion
}