Ejemplo n.º 1
0
 private void STLINE(string BR_SELECT_ROW_FATURA_NO, string ID)
 {
     if (BR_SELECT_ROW_FATURA_NO != "" && ID != "")
     {
         _ERP_CLASS sql            = new _ERP_CLASS();
         string     LINE_TABLE_SQL = string.Format(sql.LINE_TABLE_SQL, _GLOBAL_PARAMETERS._DBONAME, _GLOBAL_PARAMETERS._SIRKET_NO.ToString(), "01");
         using (SqlConnection myConnection = new SqlConnection(_GLOBAL_PARAMETERS._CONNECTIONSTRING_ERP.ToString()))
         {
             SqlDataAdapter da = new SqlDataAdapter(LINE_TABLE_SQL + " AND (ln.INVOICEREF=" + ID + ")", myConnection);
             DataSet        ds = new DataSet();
             da.Fill(ds, "dbo_MecraList");
             DataViewManager dvManager = new DataViewManager(ds);
             DataView        dv        = dvManager.CreateDataView(ds.Tables[0]);
             gridCntrl_LINE.DataSource = dv;
             myConnection.Close();
         }
     }
 }
Ejemplo n.º 2
0
 private void DATA_LOAD()
 {
     using (SqlConnection myConnection = new SqlConnection(_GLOBAL_PARAMETERS._CONNECTIONSTRING_ERP.ToString()))
     {
         _ERP_CLASS sql = new _ERP_CLASS();
         string     INVOICE_TABLE_SQL = string.Format(sql.INVOICE_TABLE_SQL_PRINT, _GLOBAL_PARAMETERS._DBONAME, _GLOBAL_PARAMETERS._SIRKET_NO.ToString(), "01");
         SqlCommand cmd = myConnection.CreateCommand();
         cmd.CommandText = INVOICE_TABLE_SQL + " AND (fat.TRCODE IN (" + _FATURA_TYPE + ")) ";
         SqlDataAdapter deMaster = new SqlDataAdapter(cmd);
         DataSet        ds       = new DataSet();
         deMaster.Fill(ds, "Header");
         ds.Relations.Clear();
         //ds.Relations.Add("Rapor", ds.Tables["Header"].Columns["LOGICALREF"], ds.Tables["Detail"].Columns["INVOICEREF"], false);
         //gridCntrl_LIST.LevelTree.Nodes.Add(ds.Relations["Rapor"].RelationName, gridView_DETAYLAR);
         gridCntrl_LIST.DataSource = ds.Tables["Header"];
         gridCntrl_LIST.Refresh();
         gridCntrl_LIST.RefreshDataSource();
         myConnection.Close();
     }
 }