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(); } } }
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(); } } }
internal void DeleteTheTerrioToryInformation(Terriotory aTerriotoryObj) { aTerriotoryGatewayObj.DeleteTheTerrioToryInformation(aTerriotoryObj); }
internal void SaveTheTerrioToryInformation(Terriotory aTerriotoryObj) { aTerriotoryGatewayObj.SaveTheTerrioToryInformation(aTerriotoryObj); }