Пример #1
0
    public DataTable fetchMPBasedOnStateorConstituency(countryBO CountryBO, stateBO StateBO, constituencyBO constituencyBO)
    {
        try
        {
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            dap = new SqlDataAdapter("fetchMPBasedOnStateorConstituency", con);
            dap.SelectCommand.CommandType = CommandType.StoredProcedure;
            dap.SelectCommand.Parameters.AddWithValue("@countryId", CountryBO.countryId);
            dap.SelectCommand.Parameters.AddWithValue("@stateId", StateBO.stateId);
            dap.SelectCommand.Parameters.AddWithValue("@constituencyId", constituencyBO.constituencyId);
            DataSet ds = new DataSet();
            dap.Fill(ds, "tblMpDetails");
            dap.Dispose();
            return(ds.Tables["tblMpDetails"]);
        }
        catch
        {
            throw;
        }
        finally
        {
            con.Close();
        }
    }
Пример #2
0
    public bool countryInsert(countryBO countryBO)
    {
        try
        {
            query = "countryInsert";
            cmd = new SqlCommand("countryInsert", con);
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@countryName",countryBO.country);
            SqlParameter message = cmd.Parameters.Add("@res", SqlDbType.Bit);
            message.Direction = ParameterDirection.Output;
            cmd.ExecuteNonQuery();
            return (bool.Parse(message.Value.ToString()));
        }
        catch
        {
            throw;

        }
        finally
        {
            con.Close();
        }
    }
    public DataTable fetchMPBasedOnStateorConstituency(countryBO CountryBO, stateBO StateBO, constituencyBO constituencyBO)
    {
        try
        {
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            dap = new SqlDataAdapter("fetchMPBasedOnStateorConstituency", con);
            dap.SelectCommand.CommandType = CommandType.StoredProcedure;
            dap.SelectCommand.Parameters.AddWithValue("@countryId", CountryBO.countryId);
            dap.SelectCommand.Parameters.AddWithValue("@stateId", StateBO.stateId);
            dap.SelectCommand.Parameters.AddWithValue("@constituencyId", constituencyBO.constituencyId);
            DataSet ds = new DataSet();
            dap.Fill(ds, "tblMpDetails");
            dap.Dispose();
            return ds.Tables["tblMpDetails"];
        }
        catch
        {
            throw;
        }
        finally
        {
            con.Close();
        }
    }
Пример #4
0
 public bool countryInsert(countryBO countryBO)
 {
     try
     {
         query = "countryInsert";
         cmd   = new SqlCommand("countryInsert", con);
         if (con.State == ConnectionState.Closed)
         {
             con.Open();
         }
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@countryName", countryBO.country);
         SqlParameter message = cmd.Parameters.Add("@res", SqlDbType.Bit);
         message.Direction = ParameterDirection.Output;
         cmd.ExecuteNonQuery();
         return(bool.Parse(message.Value.ToString()));
     }
     catch
     {
         throw;
     }
     finally
     {
         con.Close();
     }
 }
 public DataTable fetchMPBasedOnStateorConstituency(countryBO CountryBO, stateBO StateBO, constituencyBO constituencyBO)
 {
     try
     {
         return mpDetailsDAL.fetchMPBasedOnStateorConstituency(CountryBO, StateBO, constituencyBO);
     }
     catch
     {
         throw;
     }
     finally
     { }
 }
Пример #6
0
 public DataTable fetchMPBasedOnStateorConstituency(countryBO CountryBO, stateBO StateBO, constituencyBO constituencyBO)
 {
     try
     {
         return(mpDetailsDAL.fetchMPBasedOnStateorConstituency(CountryBO, StateBO, constituencyBO));
     }
     catch
     {
         throw;
     }
     finally
     { }
 }
Пример #7
0
 public bool countryInsert(countryBO countryBO)
 {
     try
     {
         return(CountryDAL.countryInsert(countryBO));
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
Пример #8
0
    public bool countryInsert(countryBO countryBO)
    {
        try
        {
          return  CountryDAL.countryInsert(countryBO);

        }
        catch
        {
            throw;
        }
        finally
        {

        }
    }