示例#1
0
 public bool districtInsert(districtBO districtBO)
 {
     try
     {
         if (con.State == ConnectionState.Closed)
         {
             con.Open();
         }
         query = "districtInsert";
         cmd = new SqlCommand(query, con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@stateId", districtBO.stateId);
         cmd.Parameters.AddWithValue("@districtName", districtBO.districtName);
         SqlParameter message = cmd.Parameters.Add("@res", SqlDbType.Bit);
         message.Direction = ParameterDirection.Output;
         cmd.ExecuteNonQuery();
         return (bool.Parse(message.Value.ToString()));
     }
     catch
     {
         throw;
     }
     finally
     {
         if (con.State == ConnectionState.Open)
         {
             con.Close();
         }
     }
 }
示例#2
0
 public void districtUpdate(districtBO districtBO)
 {
     try
     {
         if (con.State == ConnectionState.Closed)
         {
             con.Open();
         }
         query           = "districtUpdate";
         cmd             = new SqlCommand(query, con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@stateId", districtBO.stateId);
         cmd.Parameters.AddWithValue("@districtId", districtBO.districtId);
         cmd.Parameters.AddWithValue("@districtName", districtBO.districtName);
         cmd.ExecuteNonQuery();
     }
     catch
     {
         throw;
     }
     finally
     {
         if (con.State == ConnectionState.Open)
         {
             con.Close();
         }
     }
 }
    public void districtUpdate(districtBO districtBO)
    {
        try
        {
            if (con.State == ConnectionState.Closed)
            {
                con.Open();
            }
            query = "districtUpdate";
            cmd = new SqlCommand(query, con);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@stateId", districtBO.stateId);
            cmd.Parameters.AddWithValue("@districtId", districtBO.districtId);
            cmd.Parameters.AddWithValue("@districtName", districtBO.districtName);
            cmd.ExecuteNonQuery();

        }
        catch
        {
            throw;
        }
        finally
        {
            if (con.State == ConnectionState.Open)
            {
                con.Close();
            }
        }
    }
示例#4
0
 public bool districtInsert(districtBO districtBO)
 {
     try
     {
         if (con.State == ConnectionState.Closed)
         {
             con.Open();
         }
         query           = "districtInsert";
         cmd             = new SqlCommand(query, con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@stateId", districtBO.stateId);
         cmd.Parameters.AddWithValue("@districtName", districtBO.districtName);
         SqlParameter message = cmd.Parameters.Add("@res", SqlDbType.Bit);
         message.Direction = ParameterDirection.Output;
         cmd.ExecuteNonQuery();
         return(bool.Parse(message.Value.ToString()));
     }
     catch
     {
         throw;
     }
     finally
     {
         if (con.State == ConnectionState.Open)
         {
             con.Close();
         }
     }
 }
示例#5
0
 public void districtUpdate(districtBO districtBO)
 {
     try
     {
         districtDAL.districtUpdate(districtBO);
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
示例#6
0
 public bool districtInsert(districtBO districtBO)
 {
     try
     {
         return(districtDAL.districtInsert(districtBO));
     }
     catch
     {
         throw;
     }
     finally
     {
     }
 }
    public void districtUpdate(districtBO districtBO)
    {
        try
        {
            districtDAL.districtUpdate(districtBO);
        }
        catch
        {
            throw;
        }
        finally
        {

        }
    }
    public bool districtInsert(districtBO districtBO)
    {
        try
        {
            return districtDAL.districtInsert(districtBO);
        }
        catch
        {
            throw;
        }
        finally
        {

        }
    }