Ejemplo n.º 1
0
    internal void SaveTheTerrioToryInformation(Terriotory aTerriotoryObj)
    {
        try
        {
            connection.Open();
            string     selectQuery = @"INSERT INTO [tbl_employee_territory_information]
       ([empter_id]
       ,[empter_terriotory_name])
 VALUES
       ('" + aTerriotoryObj.TerriotoryId + "','" + aTerriotoryObj.TerrioToryName + "')";
            SqlCommand command     = new SqlCommand(selectQuery, connection);
            command.ExecuteNonQuery();
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message);
        }
        finally
        {
            if (connection.State == ConnectionState.Open)
            {
                connection.Close();
            }
        }
    }
Ejemplo n.º 2
0
 internal void DeleteTheTerrioToryInformation(Terriotory aTerriotoryObj)
 {
     try
     {
         connection.Open();
         string     selectQuery = @"DELETE FROM [tbl_employee_territory_information] WHERE [empter_id] ='" + aTerriotoryObj.TerriotoryId + "'  ";
         SqlCommand command     = new SqlCommand(selectQuery, connection);
         command.ExecuteNonQuery();
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
     finally
     {
         if (connection.State == ConnectionState.Open)
         {
             connection.Close();
         }
     }
 }
Ejemplo n.º 3
0
 internal void DeleteTheTerrioToryInformation(Terriotory aTerriotoryObj)
 {
     aTerriotoryGatewayObj.DeleteTheTerrioToryInformation(aTerriotoryObj);
 }
Ejemplo n.º 4
0
 internal void SaveTheTerrioToryInformation(Terriotory aTerriotoryObj)
 {
     aTerriotoryGatewayObj.SaveTheTerrioToryInformation(aTerriotoryObj);
 }