// this will find customer's id based on data added on text boxes
    private int find_customer_id()
    {
        int id;

        String    customer_mobile = txt_customer_mobile_no.Text;
        DataTable dt = Select_Logic.get_data_with_three_para("select_customer_sp", customer_name, customer_mobile);

        if (dt.Rows.Count == 0)
        {
            id = 0;
        }
        else
        {
            id = Convert.ToInt32(dt.Rows[0][0]);
        }

        return(id);
    }
Beispiel #2
0
    private string find_customer_id()
    {
        string    id;
        string    customer_name   = txt_customer_name.Text;
        String    customer_mobile = txt_mobile_no.Text;
        DataTable dt = Select_Logic.get_data_with_three_para("select_customer_sp", customer_name, customer_mobile);

        if (dt.Rows.Count == 0)
        {
            id = "0";
        }
        else
        {
            id = dt.Rows[0][0].ToString();
        }

        return(id);
    }