Beispiel #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();
        }
    }
Beispiel #2
0
    public bool stateInsert(stateBO StateBO)
    {
        try
        {
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            cmd = new SqlCommand("stateInsert", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@stateName", StateBO.state);
            cmd.Parameters.AddWithValue("@noOfConstituency", StateBO.noOfConstituency);
            cmd.Parameters.AddWithValue("@countryId", StateBO.countryId);
            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 void updateState(stateBO StateBO)
    {
        try
        {
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            cmd = new SqlCommand("stateUpdate", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@countryId", StateBO.countryId);
            cmd.Parameters.AddWithValue("@stateId", StateBO.stateId);
            cmd.Parameters.AddWithValue("@stateName", StateBO.state);
            cmd.ExecuteNonQuery();
        }
        catch
        {
            throw;
        }
        finally
        {
            con.Close();
        }
    }
Beispiel #4
0
    public void updateState(stateBO StateBO)
    {
        try
        {
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            cmd             = new SqlCommand("stateUpdate", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@countryId", StateBO.countryId);
            cmd.Parameters.AddWithValue("@stateId", StateBO.stateId);
            cmd.Parameters.AddWithValue("@stateName", StateBO.state);
            cmd.ExecuteNonQuery();
        }
        catch
        {
            throw;
        }
        finally
        {
            con.Close();
        }
    }
Beispiel #5
0
    public void StateIn(stateBO StateBO)
    {
        try
        {
            if (care.State == ConnectionState.Closed)
            {
                care.Open();
            }

            cmd = new SqlCommand("StateIn", care);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@stateName", StateBO.state);
            cmd.Parameters.AddWithValue("@noOfConstituency", StateBO.noOfConstituency);
            cmd.Parameters.AddWithValue("@countryId", StateBO.countryId);
            cmd.ExecuteNonQuery();
        }
        catch
        {
            throw;
        }
        finally
        {
            care.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();
        }
    }
Beispiel #7
0
    public bool stateInsert(stateBO StateBO)
    {
        try
        {
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }

            cmd             = new SqlCommand("stateInsert", con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@stateName", StateBO.state);
            cmd.Parameters.AddWithValue("@noOfConstituency", StateBO.noOfConstituency);
            cmd.Parameters.AddWithValue("@countryId", StateBO.countryId);
            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
     { }
 }
Beispiel #9
0
 public DataTable fetchMPBasedOnStateorConstituency(countryBO CountryBO, stateBO StateBO, constituencyBO constituencyBO)
 {
     try
     {
         return(mpDetailsDAL.fetchMPBasedOnStateorConstituency(CountryBO, StateBO, constituencyBO));
     }
     catch
     {
         throw;
     }
     finally
     { }
 }
Beispiel #10
0
 public bool stateInsert(stateBO StateBO)
 {
     try
     {
        return ob.stateInsert(StateBO);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
Beispiel #11
0
 public void updateState(stateBO StateBO)
 {
     try
     {
         ob.updateState(StateBO);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
Beispiel #12
0
 public bool stateInsert(stateBO StateBO)
 {
     try
     {
         return(ob.stateInsert(StateBO));
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
Beispiel #13
0
 public void stateIn(stateBO StateBO)
 {
     try
     {
         StateDAL.StateIn(StateBO);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
    public void updateState(stateBO StateBO)
    {
        try
        {
            ob.updateState(StateBO);

        }
        catch
        {
            throw;
        }
        finally
        {
        }
    }