Dobry den po delsi dobe bych mel zase jeden dotazek. Mam tabulku v datasetu a potrebuji z teto tabulky selectovat urcite vety a ty naplnit do copie teto tabulky. Porad se mi to nedari Dekuji MK Zde prikladam code
DataTable dtOrder = this.dt_order_tab.Copy();
dtOrder.Rows.Clear();
string sConditions = string.Empty;
try
{
if (iOrderStatus == CConstant.ORDER_TAB_STATUS_EPT_CONTENT)
sConditions = "ORDER_STATUS >" + 0;
else
if (iOrderStatus == CConstant.ORDER_TAB_STATUS_CURENT_PLAN)
sConditions = "ORDER_STATUS >" + 2;
else
if (iOrderStatus == CConstant.ORDER_TAB_STATUS_EPT_CONTENT)
sConditions = "ORDER_STATUS =" + iOrderStatus;
DataRow[] drOrderTab = this.dt_order_tab.Select(sConditions);
DataRowCollection rowCollection = dtOrder.Rows;
DataRow row = rowCollection.Add(drOrderTab);
foreach (DataRow dr in rowCollection)
{
dtOrder.Rows.Add(dr);
}
}
|