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();
        }
    }
示例#3
0
 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();
         }
     }
 }
示例#4
0
 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();
     }
 }
示例#5
0
 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();
     }
 }
示例#6
0
    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 { }
 }
示例#8
0
 public bool partyInsert(partyBO PartyBO)
 {
     try
     {
         return(ob.partyInsert(PartyBO));
     }
     catch
     {
         throw;
     }
     finally { }
 }
示例#9
0
 public void partyIn(partyBO PartyBO)
 {
     try
     {
         partyDAL.partyIn(PartyBO);
     }
     catch
     {
         throw;
     }
     finally { }
 }
示例#10
0
 public void partyUpdate(partyBO PartyBO)
 {
     try
     {
         ob.partyUpdate(PartyBO);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
示例#11
0
 public DataTable getData(partyBO PartyBO)
 {
     try
     {
         return ob.getData(PartyBO);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
示例#12
0
 public void partyUpdate(partyBO PartyBO)
 {
     try
     {
         ob.partyUpdate(PartyBO);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
示例#13
0
 public DataTable getData(partyBO PartyBO)
 {
     try
     {
         return(ob.getData(PartyBO));
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }