internal static void AddItemTable(DataTable itemTable, DataTable cRTable, DataTable usdItemTable, DataListEdit dataForm)
        {
            DataTable dt = new DataTable();
            dt.Columns.Add("ExpenseType");
            dt.Columns.Add("DealAmount");
            dt.Columns.Add("DepositAmount");
            dt.Columns.Add("PayAmount");
            dt.Columns.Add("CostCenter");
            dt.Columns.Add("GLAccount");
            dt.Columns.Add("AmountType");
            dt.Columns.Add("TransactionDescription");
            dt.Columns.Add("EmployeeID");
            dt.Columns.Add("EmployeeName");
            dt.Columns.Add("CCCWWorkflowNumber");
            dt.Columns.Add("CreditCardBillID");
            if (GetExpenseTypeResult(itemTable))
            {
                foreach (DataRow dr in itemTable.Rows)
                {
                    DataRow newdr = dt.Rows.Add();
                    newdr["ExpenseType"] = dr["ExpenseType"].ToString();
                    newdr["CostCenter"] = dr["CostCenter"].ToString();
                    newdr["DealAmount"] = dr["DealAmount"].ToString();
                    newdr["DepositAmount"] = dr["DepositAmount"].ToString();
                    newdr["PayAmount"] = dr["PayAmount"].ToString();
                    newdr["GLAccount"] = dr["GLAccount"].ToString();
                    newdr["EmployeeID"] = dr["EmployeeID"].ToString();
                    newdr["EmployeeName"] = dr["EmployeeName"].ToString();
                    newdr["AmountType"] = dr["AmountType"].ToString();
                    newdr["CCCWWorkflowNumber"] = dr["CCCWWorkflowNumber"].ToString();
                    newdr["TransactionDescription"] = dr["TransactionDescription"].ToString();
                    newdr["CreditCardBillID"] = dr["CreditCardBillID"].ToString();
                }
                foreach (DataRow dr in cRTable.Rows)
                {
                    if (dr["AmountType"].ToString() == "RMB")
                    {
                        DataRow newdr = dt.Rows.Add();
                        newdr["ExpenseType"] = dr["ExpenseType"].ToString();
                        newdr["CostCenter"] = dr["CostCenter"].ToString();
                        newdr["DealAmount"] = dr["DealAmount"].ToString();
                        newdr["DepositAmount"] = dr["DepositAmount"].ToString();
                        newdr["PayAmount"] = dr["PayAmount"].ToString();
                        newdr["GLAccount"] = dr["GLAccount"].ToString();
                        newdr["EmployeeID"] = dr["EmployeeID"].ToString();
                        newdr["EmployeeName"] = dr["EmployeeName"].ToString();
                        newdr["AmountType"] = dr["AmountType"].ToString();
                        newdr["CCCWWorkflowNumber"] = dr["CCCWWorkflowNumber"].ToString();
                        newdr["TransactionDescription"] = dr["TransactionDescription"].ToString();
                        newdr["CreditCardBillID"] = dr["CreditCardBillID"].ToString();
                    }
                }
                foreach (DataRow dr in usdItemTable.Rows)
                {
                    DataRow newdr = dt.Rows.Add();
                    newdr["ExpenseType"] = dr["ExpenseType"].ToString();
                    newdr["CostCenter"] = dr["CostCenter"].ToString();
                    newdr["DealAmount"] = dr["DealAmount"].ToString();
                    newdr["DepositAmount"] = dr["DepositAmount"].ToString();
                    newdr["PayAmount"] = dr["PayAmount"].ToString();
                    newdr["GLAccount"] = dr["GLAccount"].ToString();
                    newdr["EmployeeID"] = dr["EmployeeID"].ToString();
                    newdr["EmployeeName"] = dr["EmployeeName"].ToString();
                    newdr["AmountType"] = dr["AmountType"].ToString();
                    newdr["CCCWWorkflowNumber"] = dr["CCCWWorkflowNumber"].ToString();
                    newdr["TransactionDescription"] = dr["TransactionDescription"].ToString();
                    newdr["CreditCardBillID"] = dr["CreditCardBillID"].ToString();
                }
                foreach (DataRow dr in cRTable.Rows)
                {
                    if (dr["AmountType"].ToString() == "USD")
                    {
                        DataRow newdr = dt.Rows.Add();
                        newdr["ExpenseType"] = dr["ExpenseType"].ToString();
                        newdr["CostCenter"] = dr["CostCenter"].ToString();
                        newdr["DealAmount"] = dr["DealAmount"].ToString();
                        newdr["DepositAmount"] = dr["DepositAmount"].ToString();
                        newdr["PayAmount"] = dr["PayAmount"].ToString();
                        newdr["GLAccount"] = dr["GLAccount"].ToString();
                        newdr["EmployeeID"] = dr["EmployeeID"].ToString();
                        newdr["EmployeeName"] = dr["EmployeeName"].ToString();
                        newdr["AmountType"] = dr["AmountType"].ToString();
                        newdr["CCCWWorkflowNumber"] = dr["CCCWWorkflowNumber"].ToString();
                        newdr["TransactionDescription"] = dr["TransactionDescription"].ToString();
                        newdr["CreditCardBillID"] = dr["CreditCardBillID"].ToString();
                    }
                }

                dataForm.ItemTable = dt;
            }
        }
 internal static void SaveSAPItemsDetails(DataListEdit dataForm, string workflowNumber)
 {
     BatchInsertSAPItems("Credit Card Claim SAP Detail", workflowNumber, dataForm.ItemTable);
 }
 internal static void AddItemTable(DataListEdit dataForm)
 {
     AddItemTable(dataForm.ItemTable, dataForm.CRTable, dataForm.USDItemTable, dataForm);
 }