private void OnCustomInitialize()
 {
     oForm = Application.SBO_Application.Forms.Item(this.UIAPIRawForm.UniqueID);
     OptionBtn0.Item.Width = 65;
     OptionBtn1.GroupWith("Item_7");
     OptionBtn0.Selected = true;
 }
Exemplo n.º 2
0
 private void OnCustomInitialize()
 {
     OptionBtn1.GroupWith("op_dt");
     OptionBtn0.Selected = true;
     this.oApp           = (SAPbouiCOM.Application)SAPbouiCOM.Framework.Application.SBO_Application;
     this.oCompany       = (SAPbobsCOM.Company)oApp.Company.GetDICompany();
     //Create Connection SQL
     SAPbobsCOM.Recordset oR_RecordSet = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
     oR_RecordSet.DoQuery("Select * from [@ADDONCFG]");
     if (oR_RecordSet.RecordCount > 0)
     {
         string uid = oR_RecordSet.Fields.Item("Code").Value.ToString();
         string pwd = oR_RecordSet.Fields.Item("Name").Value.ToString();
         conn = new SqlConnection(string.Format("Data Source={0}; Initial Catalog={1}; User id={2}; Password={3};", oCompany.Server, oCompany.CompanyDB, uid, pwd));
     }
     else
     {
         oApp.MessageBox("Can't connect DB !");
     }
     Load_DT();
     Load_CT();
 }