public DataTable getData(partyBO PartyBO) { try { query = "fetchParty"; if (con.State == ConnectionState.Closed) { con.Open(); } dap = new SqlDataAdapter(query, con); dap.SelectCommand.CommandType = CommandType.StoredProcedure; dap.SelectCommand.Parameters.AddWithValue("@countryId", PartyBO.countryId); DataSet ds = new DataSet(); dap.Fill(ds, "temp"); dap.Dispose(); return ds.Tables["temp"]; } catch { throw; } finally { if (con.State == ConnectionState.Open) con.Close(); } }
public bool partyInsert(partyBO PartyBO) { try { if (con.State == ConnectionState.Closed) { con.Open(); } cmd = new SqlCommand("partyInsert", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@party", PartyBO.partyName); cmd.Parameters.AddWithValue("@abbreviation", PartyBO.abbreviation); cmd.Parameters.AddWithValue("@totalMember", PartyBO.totalMember); cmd.Parameters.AddWithValue("@countryId", PartyBO.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 getData(partyBO PartyBO) { try { query = "fetchParty"; if (con.State == ConnectionState.Closed) { con.Open(); } dap = new SqlDataAdapter(query, con); dap.SelectCommand.CommandType = CommandType.StoredProcedure; dap.SelectCommand.Parameters.AddWithValue("@countryId", PartyBO.countryId); DataSet ds = new DataSet(); dap.Fill(ds, "temp"); dap.Dispose(); return(ds.Tables["temp"]); } catch { throw; } finally { if (con.State == ConnectionState.Open) { con.Close(); } } }
public bool partyInsert(partyBO PartyBO) { try { if (con.State == ConnectionState.Closed) { con.Open(); } cmd = new SqlCommand("partyInsert", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@party", PartyBO.partyName); cmd.Parameters.AddWithValue("@abbreviation", PartyBO.abbreviation); cmd.Parameters.AddWithValue("@totalMember", PartyBO.totalMember); cmd.Parameters.AddWithValue("@countryId", PartyBO.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 partyUpdate(partyBO PartyBO) { try { if (con.State == ConnectionState.Closed) { con.Open(); } cmd = new SqlCommand("partyUpdate", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@partyId", PartyBO.partyId); cmd.Parameters.AddWithValue("@party", PartyBO.partyName); cmd.Parameters.AddWithValue("@abbreviation", PartyBO.abbreviation); cmd.Parameters.AddWithValue("@totalMember", PartyBO.totalMember); cmd.Parameters.AddWithValue("@countryId", PartyBO.countryId); cmd.ExecuteNonQuery(); } catch { throw; } finally { con.Close(); } }
public void partyIn(partyBO PartyBO) { try { if (care.State == ConnectionState.Closed) { care.Open(); } cmd = new SqlCommand("partyIn",care); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@party",PartyBO.partyName); cmd.Parameters.AddWithValue("@abbreviation",PartyBO.abbreviation); cmd.Parameters.AddWithValue("@totalMember", PartyBO.totalMember); cmd.Parameters.AddWithValue("@countryId", PartyBO.countryId); cmd.ExecuteNonQuery(); } catch { throw; } finally { care.Close(); } }
public bool partyInsert(partyBO PartyBO) { try { return ob.partyInsert(PartyBO); } catch { throw; } finally { } }
public bool partyInsert(partyBO PartyBO) { try { return(ob.partyInsert(PartyBO)); } catch { throw; } finally { } }
public void partyIn(partyBO PartyBO) { try { partyDAL.partyIn(PartyBO); } catch { throw; } finally { } }
public void partyUpdate(partyBO PartyBO) { try { ob.partyUpdate(PartyBO); } catch { throw; } finally { } }
public DataTable getData(partyBO PartyBO) { try { return ob.getData(PartyBO); } catch { throw; } finally { } }
public DataTable getData(partyBO PartyBO) { try { return(ob.getData(PartyBO)); } catch { throw; } finally { } }