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(); } }
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(); } }
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 { } }
public DataTable fetchMPBasedOnStateorConstituency(countryBO CountryBO, stateBO StateBO, constituencyBO constituencyBO) { try { return(mpDetailsDAL.fetchMPBasedOnStateorConstituency(CountryBO, StateBO, constituencyBO)); } catch { throw; } finally { } }
public bool countryInsert(countryBO countryBO) { try { return(CountryDAL.countryInsert(countryBO)); } catch { throw; } finally { } }
public bool countryInsert(countryBO countryBO) { try { return CountryDAL.countryInsert(countryBO); } catch { throw; } finally { } }