Пример #1
0
    private string GetParentCustNumByCustNum(string code)
    {
        string returnV = "";

        try
        {
            CustomerAdapter adapterCustomer = new CustomerAdapter(this.oTrans);
            adapterCustomer.BOConnect();
            adapterCustomer.GetByCustID(code, false);


            if (adapterCustomer.CustomerData.Customer.Rows.Count == 1)
            {
                DataRow rRow = adapterCustomer.CustomerData.Customer[adapterCustomer.CustomerData.Customer.Rows.Count - 1];
                if (rRow != null)
                {
                    returnV = rRow["CustNum"].ToString();
                }
            }
            adapterCustomer.Dispose();
        }
        catch (Exception ex)
        {
            //ExceptionBox.Show(ex);
            return("");
        }

        return(returnV);
    }